Merge branch 'master' of github.com-rndusr:rg3/youtube-dl into fix/str-item-assignment
[youtube-dl] / youtube_dl / downloader / ism.py
index 53f319caeea565a40b78ba4899f68d18f0f0cc9e..63a636cb70079f81516da8b9e37c8e21cb9f54a2 100644 (file)
@@ -129,7 +129,7 @@ def write_piff_header(stream, params):
         sample_entry_payload += u1616.pack(params['sampling_rate'])
 
         if fourcc == 'AACL':
-            smaple_entry_box = box(b'mp4a', sample_entry_payload)
+            sample_entry_box = box(b'mp4a', sample_entry_payload)
     else:
         sample_entry_payload = sample_entry_payload
         sample_entry_payload += u16.pack(0)  # pre defined
@@ -158,8 +158,8 @@ def write_piff_header(stream, params):
             avcc_payload += u16.pack(len(pps))
             avcc_payload += pps
             sample_entry_payload += box(b'avcC', avcc_payload)  # AVC Decoder Configuration Record
-            smaple_entry_box = box(b'avc1', sample_entry_payload)  # AVC Simple Entry
-    stsd_payload += smaple_entry_box
+            sample_entry_box = box(b'avc1', sample_entry_payload)  # AVC Simple Entry
+    stsd_payload += sample_entry_box
 
     stbl_payload = full_box(b'stsd', 0, 0, stsd_payload)  # Sample Description Box
 
@@ -238,7 +238,10 @@ class IsmFD(FragmentFD):
             count = 0
             while count <= fragment_retries:
                 try:
-                    success = ctx['dl'].download(target_filename, {'url': segment_url})
+                    success = ctx['dl'].download(target_filename, {
+                        'url': segment_url,
+                        'http_headers': info_dict.get('http_headers'),
+                    })
                     if not success:
                         return False
                     down, target_sanitized = sanitize_open(target_filename, 'rb')