Browse Source

latm: Always reconfigure if no extradata was set previously

AAC LOAS can have new audio config objects in the stream itself.

Make sure the decoder reconfigures itself when the first one arrives
midstream.

Bug-Id: 644
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
tags/n2.2-rc1
Hendrik Leppkes Luca Barbato 14 years ago
parent
commit
3aca10bf76
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/aacdec.c

+ 2
- 1
libavcodec/aacdec.c View File

@@ -3030,7 +3030,8 @@ static int latm_decode_audio_specific_config(struct LATMContext *latmctx,
if (bits_consumed < 0)
return AVERROR_INVALIDDATA;

if (ac->oc[1].m4ac.sample_rate != m4ac.sample_rate ||
if (!latmctx->initialized ||
ac->oc[1].m4ac.sample_rate != m4ac.sample_rate ||
ac->oc[1].m4ac.chan_config != m4ac.chan_config) {

av_log(avctx, AV_LOG_INFO, "audio config changed\n");


Loading…
Cancel
Save