diff options
author | Alex Converse <alex.converse@gmail.com> | 2011-08-16 11:04:03 -0700 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2011-08-18 22:29:41 +0200 |
commit | 44920d04ba3ffeefc6943fc31d6d685bfc7240b1 (patch) | |
tree | 3a10a125de6feb848fc8c7cebc248bbba7b4e098 /libavcodec/aacdec.c | |
parent | 06d37fede4d36ea528ef69e4358a5775df016df0 (diff) | |
download | ffmpeg-44920d04ba3ffeefc6943fc31d6d685bfc7240b1.tar.gz |
aac: Only set sample rate and object type from ADTS if output hasn't been configured.
Long term it would be nice to support error resilient reconfiguration
but right now setting this every frame does more harm than help.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/aacdec.c')
-rw-r--r-- | libavcodec/aacdec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index d554f41e2e..ef5daed5ca 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -2092,10 +2092,10 @@ static int parse_adts_frame_header(AACContext *ac, GetBitContext *gb) if (ac->output_configured != OC_LOCKED) { ac->m4ac.sbr = -1; ac->m4ac.ps = -1; + ac->m4ac.sample_rate = hdr_info.sample_rate; + ac->m4ac.sampling_index = hdr_info.sampling_index; + ac->m4ac.object_type = hdr_info.object_type; } - ac->m4ac.sample_rate = hdr_info.sample_rate; - ac->m4ac.sampling_index = hdr_info.sampling_index; - ac->m4ac.object_type = hdr_info.object_type; if (!ac->avctx->sample_rate) ac->avctx->sample_rate = hdr_info.sample_rate; if (hdr_info.num_aac_frames == 1) { |