1
From b4099a6dc539c54156a788c7020356c54bc6485e Mon Sep 17 00:00:00 2001
2
From: Alex Converse <alex.converse@gmail.com>
3
Date: Tue, 16 Aug 2011 11:03:26 -0700
4
Subject: [PATCH 33/70] aac: Only output configure if audio was found.
6
Audio found is not triggered on a CCE because a CCE alone has no output.
8
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9
(cherry picked from commit d8425ed4af6d8fce62ff363cc590f85e57bac06b)
11
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13
libavcodec/aacdec.c | 7 +++++--
14
1 files changed, 5 insertions(+), 2 deletions(-)
16
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
17
index f94b109..2958ddb 100644
18
--- a/libavcodec/aacdec.c
19
+++ b/libavcodec/aacdec.c
20
@@ -2074,7 +2074,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
21
ChannelElement *che = NULL, *che_prev = NULL;
22
enum RawDataBlockType elem_type, elem_type_prev = TYPE_END;
23
int err, elem_id, data_size_tmp;
24
- int samples = 0, multiplier;
25
+ int samples = 0, multiplier, audio_found = 0;
27
if (show_bits(gb, 12) == 0xfff) {
28
if (parse_adts_frame_header(ac, gb) < 0) {
29
@@ -2105,10 +2105,12 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
32
err = decode_ics(ac, &che->ch[0], gb, 0, 0);
37
err = decode_cpe(ac, gb, che);
42
@@ -2117,6 +2119,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
45
err = decode_ics(ac, &che->ch[0], gb, 0, 0);
50
@@ -2193,7 +2196,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
51
samples, avctx->channels);
54
- if (ac->output_configured)
55
+ if (ac->output_configured && audio_found)
56
ac->output_configured = OC_LOCKED;