[FFmpeg-devel] [PATCH][7/8] Add VA API accelerated H.264 decoding (take 4)

Gwenole Beauchesne gbeauchesne
Mon Feb 9 14:36:14 CET 2009


On Fri, 6 Feb 2009, Michael Niedermayer wrote:

>> +static int vaapi_h264_fill_picture(VAPictureH264 *va_pic, Picture *pic, int pic_structure)
>> +{
>> +    struct vaapi_render_state *rds;
>> +    int poc;
>> +
>> +    assert(va_pic != NULL);
>> +    if (va_pic == NULL)
>> +        return -1;
>> +    assert(pic != NULL);
>> +    if (pic == NULL)
>> +        return -1;
>
> and please decide if the condition is allowed or not and then remove either
> the assert or the if()

The assert() is useful for debugging and early abort. Otherwise, if built 
with NDEBUG, this would get un-noticed in case code is changed later.




More information about the ffmpeg-devel mailing list