aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/downloader/ism.py
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2016-11-03 16:08:57 +0100
committerRemita Amine <remitamine@gmail.com>2016-11-03 16:08:57 +0100
commit10380e55def817f568b3e1b8e16a2133ded19124 (patch)
treefe1acf729538a6c09d63b7696549369132493926 /youtube_dl/downloader/ism.py
parent22979993e7afd0b8792011ead3d64d3945703ce8 (diff)
[downloader/ism] fix AVC Decoder Configuration Record creation in python 3
Diffstat (limited to 'youtube_dl/downloader/ism.py')
-rw-r--r--youtube_dl/downloader/ism.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/youtube_dl/downloader/ism.py b/youtube_dl/downloader/ism.py
index 9f8f14b66..53f319cae 100644
--- a/youtube_dl/downloader/ism.py
+++ b/youtube_dl/downloader/ism.py
@@ -149,9 +149,7 @@ def write_piff_header(stream, params):
if fourcc in ('H264', 'AVC1'):
sps, pps = codec_private_data.split(u32.pack(1))[1:]
avcc_payload = u8.pack(1) # configuration version
- avcc_payload += sps[1] # avc profile indication
- avcc_payload += sps[2] # profile compatibility
- avcc_payload += sps[3] # avc level indication
+ avcc_payload += sps[1:4] # avc profile indication + profile compatibility + avc level indication
avcc_payload += u8.pack(0xfc | (params.get('nal_unit_length_field', 4) - 1)) # complete represenation (1) + reserved (11111) + length size minus one
avcc_payload += u8.pack(1) # reserved (0) + number of sps (0000001)
avcc_payload += u16.pack(len(sps))