aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2011-08-16 11:03:26 -0700
committerReinhard Tartler <siretart@tauware.de>2011-09-26 19:26:30 +0200
commitb4099a6dc539c54156a788c7020356c54bc6485e (patch)
tree94ff0dd9bb3e941d204f89d224ba49764cddc929
parentdec458b900439316ebdefa0de2bd1249440859cf (diff)
downloadffmpeg-b4099a6dc539c54156a788c7020356c54bc6485e.tar.gz
aac: Only output configure if audio was found.
Audio found is not triggered on a CCE because a CCE alone has no output. Signed-off-by: Luca Barbato <lu_zero@gentoo.org> (cherry picked from commit d8425ed4af6d8fce62ff363cc590f85e57bac06b) Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r--libavcodec/aacdec.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index f94b109de5..2958ddbe72 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -2074,7 +2074,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
ChannelElement *che = NULL, *che_prev = NULL;
enum RawDataBlockType elem_type, elem_type_prev = TYPE_END;
int err, elem_id, data_size_tmp;
- int samples = 0, multiplier;
+ int samples = 0, multiplier, audio_found = 0;
if (show_bits(gb, 12) == 0xfff) {
if (parse_adts_frame_header(ac, gb) < 0) {
@@ -2105,10 +2105,12 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
case TYPE_SCE:
err = decode_ics(ac, &che->ch[0], gb, 0, 0);
+ audio_found = 1;
break;
case TYPE_CPE:
err = decode_cpe(ac, gb, che);
+ audio_found = 1;
break;
case TYPE_CCE:
@@ -2117,6 +2119,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
case TYPE_LFE:
err = decode_ics(ac, &che->ch[0], gb, 0, 0);
+ audio_found = 1;
break;
case TYPE_DSE:
@@ -2193,7 +2196,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
samples, avctx->channels);
}
- if (ac->output_configured)
+ if (ac->output_configured && audio_found)
ac->output_configured = OC_LOCKED;
return 0;