X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fdownloader%2Fism.py;h=9b001ecff4f407a94f74b59a8e1505ed27fd9d03;hb=2d8bb80c60289868d479e36a90cf1b73e9221893;hp=9f0fc36b394a910ad6b31eb21ad638af46808938;hpb=75a24854073e590f4efc9f037b57dee348f52b61;p=youtube-dl diff --git a/youtube_dl/downloader/ism.py b/youtube_dl/downloader/ism.py index 9f0fc36b3..9b001ecff 100644 --- a/youtube_dl/downloader/ism.py +++ b/youtube_dl/downloader/ism.py @@ -98,7 +98,7 @@ def write_piff_header(stream, params): if is_audio: smhd_payload = s88.pack(0) # balance - smhd_payload = u16.pack(0) # reserved + smhd_payload += u16.pack(0) # reserved media_header_box = full_box(b'smhd', 0, 0, smhd_payload) # Sound Media Header else: vmhd_payload = u16.pack(0) # graphics mode @@ -126,7 +126,6 @@ def write_piff_header(stream, params): if fourcc == 'AACL': sample_entry_box = box(b'mp4a', sample_entry_payload) else: - sample_entry_payload = sample_entry_payload sample_entry_payload += u16.pack(0) # pre defined sample_entry_payload += u16.pack(0) # reserved sample_entry_payload += u32.pack(0) * 3 # pre defined @@ -227,15 +226,11 @@ class IsmFD(FragmentFD): frag_index = 0 for i, segment in enumerate(segments): frag_index += 1 - if frag_index <= ctx['frag_index']: + if frag_index <= ctx['fragment_index']: continue count = 0 while count <= fragment_retries: try: - success = ctx['dl'].download(target_filename, { - 'url': segment_url, - 'http_headers': info_dict.get('http_headers'), - }) success, frag_content = self._download_fragment(ctx, segment['url'], info_dict) if not success: return False