]> git.tuebingen.mpg.de Git - paraslash.git/commit
mp4: Reject files with zero time scale.
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 28 Aug 2021 16:35:18 +0000 (18:35 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 27 Jun 2022 14:45:56 +0000 (16:45 +0200)
commit0c913731ca6a1f65b52f47f8797bb6031cb7523b
treebe18cdcb40b42507d2a51d033a5c4a7dfac385b9
parent1182720326e0392271fa66fe582d5c2be108877b
mp4: Reject files with zero time scale.

A value of zero indicates a corrupt mp4 file or a missing mdhd
atom. This is fatal because we need to divide by the time scale to
compute the duration of the audio track.

This patch modifies mp4_open_read() to check the value at open time
and fail the operation rather than allowing the open to succeed and
checking the value in mp4_get_duration(),

Only regular opens are affected since we don't look at the mdhd atom
for metadata opens.
mp4.c