projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
2297999
)
[downloader/ism] fix AVC Decoder Configuration Record creation in python 3
author
Remita Amine
<remitamine@gmail.com>
Thu, 3 Nov 2016 15:08:57 +0000
(16:08 +0100)
committer
Remita Amine
<remitamine@gmail.com>
Thu, 3 Nov 2016 15:08:57 +0000
(16:08 +0100)
youtube_dl/downloader/ism.py
patch
|
blob
|
history
diff --git
a/youtube_dl/downloader/ism.py
b/youtube_dl/downloader/ism.py
index 9f8f14b669bace4c1ee6d8a846aebed3eb05e139..53f319caeea565a40b78ba4899f68d18f0f0cc9e 100644
(file)
--- 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
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))
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))