[FFmpeg-devel] [PATCH] avformat/segafilm - fix keyframe detection and set packet, flags

Carl Eugen Hoyos ceffmpeg at gmail.com
Thu Mar 22 03:09:28 EET 2018


2018-03-21 21:32 GMT+01:00, Carl Eugen Hoyos <ceffmpeg at gmail.com>:
> 2018-03-21 14:37 GMT+01:00, Gyan Doshi <gyandoshi at gmail.com>:
>> Fix for ticket 7091.
>
>> -            film->sample_table[i].keyframe = (scratch[8] & 0x80) ? 0 :
>> 1;
>> +            film->sample_table[i].keyframe = (scratch[8] & 0x80) ? 1 :
>> 0;
>
> Can you comment on why this 15-year old code was wrong?
>
> Could be keyframe = !!(scratch & 0x80)

Or actually:
film->sample_table[i].keyframe = scratch[8] & 0x80 ? AVINDEX_KEYFRAME : 0;

Carl Eugen


More information about the ffmpeg-devel mailing list