[libav-devel] [PATCH 1/3] aac: Only output configure if audio was found.
From: Alex Converse Audio found is not triggered on a CCE because a CCE alone has no output. Signed-off-by: Luca Barbato --- libavcodec/aacdec.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index 0cae155..a380e9d 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; -- 1.7.6 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/3] aac: Only output configure if audio was found.
On 8/17/11 7:42 PM, Alex Converse wrote: On Tue, Aug 16, 2011 at 11:03 AM, Alex Converse wrote: Audio found is not triggered on a CCE because a CCE alone has no output. --- libavcodec/aacdec.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) I hope I got the patchset right, 1-3 look ok I'll send them back to the ml as doublecheck. lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/3] aac: Only output configure if audio was found.
On Tue, Aug 16, 2011 at 11:03 AM, Alex Converse wrote: > Audio found is not triggered on a CCE because a CCE alone has no output. > --- > libavcodec/aacdec.c | 7 +-- > 1 files changed, 5 insertions(+), 2 deletions(-) > Ping ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/3] aac: Only output configure if audio was found.
Audio found is not triggered on a CCE because a CCE alone has no output. --- libavcodec/aacdec.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index 0cae155..a380e9d 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; -- 1.7.3.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel