Permalink
Browse files

Fix AAC decoding audio corruption

aacdec:only overwrite configuration if theres a actual change.

Backport ffmpeg:b4d0e7804dbeeca179198791acddf3058771a32a
  • Loading branch information...
jyavenard authored and daniel-kristjansson committed Apr 5, 2012
1 parent 04e63c7 commit 549a3c8d980fbdea9e5ab774daa4f6f559bbde54
Showing with 3 additions and 2 deletions.
  1. +3 −2 mythtv/external/FFmpeg/libavcodec/aacdec.c
@@ -2294,8 +2294,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;
@@ -2311,7 +2311,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;

0 comments on commit 549a3c8

Please sign in to comment.