[FFmpeg-devel] [PATCH] AAC: give an error message when returning due to an unallocated channel element
Robert Swain
robert.swain
Thu Feb 12 14:51:41 CET 2009
2009/2/12 Baptiste Coudurier <baptiste.coudurier at gmail.com>:
> Hi,
>
> Alex Converse wrote:
>> I've run into this a few times. It's worth a message.
>>
>> Regards,
>> Alex Converse
>>
>>
>> ------------------------------------------------------------------------
>>
>> diff --git a/libavcodec/aac.c b/libavcodec/aac.c
>> index 7275430..64c2ae6 100644
>> --- a/libavcodec/aac.c
>> +++ b/libavcodec/aac.c
>> @@ -1576,7 +1576,10 @@ static int aac_decode_frame(AVCodecContext * avccontext, void * data, int * data
>> }
>> if(elem_type < TYPE_DSE) {
>> if(!ac->che[elem_type][elem_id])
>> + {
>> + av_log(ac->avccontext, AV_LOG_ERROR, "channel element %d.%d is unallocated\n", elem_type, elem_id);
>> return -1;
>> + }
>> if(elem_type != TYPE_CCE)
>> ac->che[elem_type][elem_id]->coup.coupling_point = 4;
>> }
>>
>
> Braces are misplaced. Should be "if () {"
It's consistent with the surrounding code. I'll go through and change
them to "if () {" instead of "if() {" at some point.
Regards,
Rob
More information about the ffmpeg-devel
mailing list