]> git.tuebingen.mpg.de Git - paraslash.git/commit
mp4: Introduce mp4_is_audio_track().
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 11 Aug 2021 17:12:07 +0000 (19:12 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 30 May 2022 19:37:35 +0000 (21:37 +0200)
commitc44992109c344de0b0090dbb2a72ffb261185be8
tree18916cea45f8b0be9dbd20feb50bdb4d0d4e0d98
parent30ce255fc5db519c06240951c1a36956ade789fc
mp4: Introduce mp4_is_audio_track().

Currently the aac audio format handler iterates over the tracks
in an mp4 file. For each track it tries to get the audio-specific
configuration by calling mp4_get_decoder_config() and calls into faad
to check whether it is a valid configuration for the aac decoder.

We can simplify all this because the mp4 code already knows the type
of each track, albeit it does not expose this information yet. So
provide the new mp4_is_audio_track() helper and let the aac audio
format handler pick the first track for which this helper returns true.

As an additional benefit, we can remove the now unused
mp4_get_decoder_config().
aac_afh.c
mp4.c
mp4.h