]> git.tuebingen.mpg.de Git - paraslash.git/commit
mp4: Fail early on invalid sample rate or sample count.
authorAndre Noll <maan@tuebingen.mpg.de>
Fri, 27 Aug 2021 17:06:11 +0000 (19:06 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 27 Jun 2022 14:45:56 +0000 (16:45 +0200)
commita318723afb0893cbbacfd5ad5bce356ac1ddfd7a
treecc1bcc215090f5645bf4a6445f58ed9dfbb5af64
parent84c7e6c683280d39a41155cc402f0ff2eafc7a0a
mp4: Fail early on invalid sample rate or sample count.

If the sample rate or the sample count happen to be zero, we should
fail the open rather than return success and let the caller deal with
it. This patch moves the corresponding sanity checks from aac_afh.c
to mp4_open_read() of mp4.c. The sample rate is always read while
sample count is skipped for metadata-only opens. So the first check
belongs to the common open_file() while the second check needs to go
to mp4_open_read().
aac_afh.c
mp4.c