On Fri, Oct 28, 2011 at 6:17 AM, Janne Grunau <[email protected]> wrote:
> Pass the correct size in bits to mpeg4audio_get_config and add a flag
> to disable parsing of the sync extension when the size is not known.
>
> Latm with AudioMuxVersion 0 does not specify the size of the audio
> specific config. Data after the audio specific config can be
> misinterpreted as sync extension resulting in random and wrong configs.
>
> Since all other users og avpriv_mpeg4audio_get_config know the size
> in bytes and have zero padding after the config a wrapper function
> is added to retain API/ABI compatibility.
> ---
> libavcodec/aacdec.c | 33 +++++++++++++++++++++------------
> libavcodec/mpeg4audio.c | 13 ++++++++++---
> libavcodec/mpeg4audio.h | 12 ++++++++++++
> 3 files changed, 43 insertions(+), 15 deletions(-)
>
I'm still OK with this as-is but...
> --- a/libavcodec/mpeg4audio.c
> +++ b/libavcodec/mpeg4audio.c
> @@ -76,12 +76,13 @@ static inline int get_sample_rate(GetBitContext *gb, int
> *index)
> avpriv_mpeg4audio_sample_rates[*index];
> }
>
> -int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf,
> int buf_size)
> +int ff_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf,
> + int bit_size, int sync_extension)
> {
If renaming 'ff_mpeg4audio_get_config' to
'avpriv_mpeg4audio_get_config' in
59a9a235811dc5f6a2c8b631a320968a06a867d1 was ok then maybe this
wrapper business is unnecessary.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel