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

Benoit Fouet benoit.fouet
Thu Feb 12 09:07:25 CET 2009


On 02/12/2009 07:49 AM, Alex Converse wrote:
> 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?
>   

it's to follow what's already done in that file...
and doing it in another commit would be a bit too much

Ben




More information about the ffmpeg-devel mailing list