Skip to content

Commit

Permalink
Fix AAC decoding audio corruption
Browse files Browse the repository at this point in the history
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 549a3c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mythtv/external/FFmpeg/libavcodec/aacdec.c
Expand Up @@ -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;

Expand All @@ -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;

Expand Down

0 comments on commit 549a3c8

Please sign in to comment.