[FFmpeg-devel] [PATCH] AAC: give an error message when returning due to an unallocated channel element

Alex Converse alex.converse
Thu Feb 12 07:49:38 CET 2009


On Thu, Feb 12, 2009 at 1:33 AM, Baptiste Coudurier
<baptiste.coudurier at gmail.com> wrote:
> 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 () {"
>

Isn't that cosmetics?




More information about the ffmpeg-devel mailing list