Skip to content
Snippets Groups Projects
Commit b4d0e780 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

aacdec:only overwrite configuration if theres a actual change.

Fixes Ticket574

Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent e6e86e64
No related branches found
No related tags found
No related merge requests found
...@@ -2321,8 +2321,8 @@ static int latm_decode_audio_specific_config(struct LATMContext *latmctx, ...@@ -2321,8 +2321,8 @@ static int latm_decode_audio_specific_config(struct LATMContext *latmctx,
GetBitContext *gb, int asclen) GetBitContext *gb, int asclen)
{ {
AVCodecContext *avctx = latmctx->aac_ctx.avctx; AVCodecContext *avctx = latmctx->aac_ctx.avctx;
MPEG4AudioConfig m4ac;
AACContext *ac= &latmctx->aac_ctx; AACContext *ac= &latmctx->aac_ctx;
MPEG4AudioConfig m4ac=ac->m4ac;
int config_start_bit = get_bits_count(gb); int config_start_bit = get_bits_count(gb);
int bits_consumed, esize; int bits_consumed, esize;
...@@ -2338,7 +2338,8 @@ static int latm_decode_audio_specific_config(struct LATMContext *latmctx, ...@@ -2338,7 +2338,8 @@ static int latm_decode_audio_specific_config(struct LATMContext *latmctx,
if (bits_consumed < 0) if (bits_consumed < 0)
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
ac->m4ac= m4ac; if(ac->m4ac.sample_rate != m4ac.sample_rate || m4ac.chan_config != ac->m4ac.chan_config)
ac->m4ac= m4ac;
esize = (bits_consumed+7) / 8; esize = (bits_consumed+7) / 8;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment