aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2011-12-23 00:14:32 +0100
committerReinhard Tartler <siretart@tauware.de>2014-03-02 11:42:38 -0500
commit031d3b66c2ea3b338cb7ce437bce47a8a4930ebb (patch)
tree63fa526c4d76ba3cec80f17e538c3b0121457e86
parent15ae305007c09a958db27e902e5fbff06753a01c (diff)
downloadffmpeg-031d3b66c2ea3b338cb7ce437bce47a8a4930ebb.tar.gz
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> (cherry picked from commit 3aca10bf762a94d7de555cedf1ff0e4f6792bf41)
-rw-r--r--libavcodec/aacdec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index a3652098db..e25838fca0 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -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");