[FFmpeg-devel] [PATCH v2 3/3] lavc/libdavs2: correct frame type setting

Carl Eugen Hoyos ceffmpeg at gmail.com
Thu Nov 1 02:40:50 EET 2018


2018-10-31 23:15 GMT+01:00, Mark Thompson <sw at jkqxz.net>:
> On 31/10/18 10:23, hwren wrote:

>> +    switch (pic->type) {
>> +        case DAVS2_PIC_I:
>> +            frame->pict_type = AV_PICTURE_TYPE_I;
>> +            break;
>> +        case DAVS2_PIC_P:
>> +            frame->pict_type = AV_PICTURE_TYPE_P;
>> +            break;
>> +        case DAVS2_PIC_B:
>> +        case DAVS2_PIC_F:
>> +            frame->pict_type = AV_PICTURE_TYPE_B;
>> +            break;
>> +        default:
>> +            frame->pict_type = AV_PICTURE_TYPE_NONE;
>
> Are there any types which aren't already handled?  If there aren't
> then this would probably be better as an assert.

Since this is an external library, an assert would be wrong.

I wanted to suggest an error message or a negative return value.

Carl Eugen


More information about the ffmpeg-devel mailing list