diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-10-20 21:57:52 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-10-20 21:57:52 +0200 |
commit | b4d0e7804dbeeca179198791acddf3058771a32a (patch) | |
tree | aa2052e031fa46f36c48e6831416b453cf4f1960 /libavcodec | |
parent | e6e86e64c34dcf91d6b75b91accc998bd02fcd51 (diff) | |
download | ffmpeg-streaming-b4d0e7804dbeeca179198791acddf3058771a32a.zip ffmpeg-streaming-b4d0e7804dbeeca179198791acddf3058771a32a.tar.gz |
aacdec:only overwrite configuration if theres a actual change.
Fixes Ticket574
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/aacdec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index 64f8972..6963d71 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -2321,8 +2321,8 @@ static int latm_decode_audio_specific_config(struct LATMContext *latmctx, GetBitContext *gb, int asclen) { AVCodecContext *avctx = latmctx->aac_ctx.avctx; - MPEG4AudioConfig m4ac; AACContext *ac= &latmctx->aac_ctx; + MPEG4AudioConfig m4ac=ac->m4ac; int config_start_bit = get_bits_count(gb); int bits_consumed, esize; @@ -2338,7 +2338,8 @@ static int latm_decode_audio_specific_config(struct LATMContext *latmctx, if (bits_consumed < 0) 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; |