]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[downloader/ism] Fix Python 3.2 support
authorSergey M․ <dstftw@gmail.com>
Sat, 27 Jan 2018 22:14:40 +0000 (05:14 +0700)
committerSergey M․ <dstftw@gmail.com>
Sat, 27 Jan 2018 22:20:21 +0000 (05:20 +0700)
youtube_dl/downloader/ism.py

index 9b001ecff4f407a94f74b59a8e1505ed27fd9d03..138564267ad17ee541fa1119fe7ae26d4eb6ad4b 100644 (file)
@@ -139,7 +139,7 @@ def write_piff_header(stream, params):
         sample_entry_payload += u16.pack(0x18)  # depth
         sample_entry_payload += s16.pack(-1)  # pre defined
 
-        codec_private_data = binascii.unhexlify(params['codec_private_data'])
+        codec_private_data = binascii.unhexlify(params['codec_private_data'].encode('utf-8'))
         if fourcc in ('H264', 'AVC1'):
             sps, pps = codec_private_data.split(u32.pack(1))[1:]
             avcc_payload = u8.pack(1)  # configuration version