aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2011-08-16 11:03:26 -0700
committerLuca Barbato <lu_zero@gentoo.org>2011-08-18 22:29:41 +0200
commitd8425ed4af6d8fce62ff363cc590f85e57bac06b (patch)
treed57d23f68e2b98bc8ce450edacf7bc7ed912add5
parent6f1c66d526faa9ed707f4b7b0a7a26fba57de8b6 (diff)
downloadffmpeg-d8425ed4af6d8fce62ff363cc590f85e57bac06b.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>
-rw-r--r--libavcodec/aacdec.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index 0cae1550fa..a380e9d664 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -2114,7 +2114,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) {
@@ -2145,10 +2145,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:
@@ -2157,6 +2159,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:
@@ -2233,7 +2236,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;