Commit d8425ed4 authored by Alex Converse's avatar Alex Converse Committed by Luca Barbato

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: 's avatarLuca Barbato <lu_zero@gentoo.org>
parent 6f1c66d5
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment