]> git.tuebingen.mpg.de Git - paraslash.git/commit - aac_afh.c
mp4: Don't abort on truncated files.
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 29 Jun 2022 11:38:02 +0000 (13:38 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 29 Jun 2022 11:38:02 +0000 (13:38 +0200)
commit7944326236f20f9ecccfe6ed0e471d665aba0123
tree286587b7b46dfaecabac25177f67fddcfa99a4c2
parent0b0434f3debae3fc5cd768f5de32f84f05e79761
mp4: Don't abort on truncated files.

If the source file got truncated it may happen that a chunk cannot
be read because the computed file offset is beyond EOF. Currently,
aac_afh_get_chunk() aborts in this case because we assert that the
file offset is within range. Return a proper error code instead and
also change aac_get_file_info() to bail out if aac_afh_get_chunk()
returns negative.
aac_afh.c