Break if media headers are corrupt. fix #1828
This commit is contained in:
1 parent
da9dda2c2b
commit
52163428e9
1 file changed
+4
@@ -284,6 +284,10 @@ class MPEG4(core.AVContainer):
|
|||||||
|
|
||||||
while datasize:
|
while datasize:
|
||||||
mdia = struct.unpack('>I4s', atomdata[pos:pos + 8])
|
mdia = struct.unpack('>I4s', atomdata[pos:pos + 8])
|
||||||
|
|
||||||
|
if mdia[0] == 0:
|
||||||
|
break
|
||||||
|
|
||||||
if mdia[1] == 'mdhd':
|
if mdia[1] == 'mdhd':
|
||||||
# Parse based on version of mdhd header. See
|
# Parse based on version of mdhd header. See
|
||||||
# http://wiki.multimedia.cx/index.php?title=QuickTime_container#mdhd
|
# http://wiki.multimedia.cx/index.php?title=QuickTime_container#mdhd
|
||||||
|
|||||||
Reference in new issue
Block a user