]> git.tuebingen.mpg.de Git - paraslash.git/commit - aac_afh.c
mp4: Remove E_MP4_BAD_CHANNEL_COUNT.
authorAndre Noll <maan@tuebingen.mpg.de>
Fri, 27 Aug 2021 14:07:24 +0000 (16:07 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 6 Jun 2022 18:46:37 +0000 (20:46 +0200)
commit84c7e6c683280d39a41155cc402f0ff2eafc7a0a
tree5f4ab67c4a838261645a85c8c4cd47ce34a50ce8
parent5ed19fbaa7145db070142c288ec5eb184d36dbc5
mp4: Remove E_MP4_BAD_CHANNEL_COUNT.

If the mp4 file does not contain an m4a atom, the channel
count stays at zero and open_file() returns -E_MP4_TRACK in this
case. So the check in aac_afh.c for a non-positive return value from
mp4_get_channel_count() can never trigger. Replace the check by an
assertion and remove the error code.

Also, let mp4_get_channel_count() return uint16_t as the number of
channels is stored as an unsigned 16 bit number in the mp4 file.
aac_afh.c
error.h
mp4.c
mp4.h