[FFmpeg-devel] [PATCH] avcodec/vc1: set ticks_per_frame irrespective of FRAMERATE_FLAG

Jerome Borsboom jerome.borsboom at carpalis.nl
Wed Oct 24 16:32:20 EEST 2018


> 2018-10-23 14:50 GMT+02:00, Jerome Borsboom <jerome.borsboom at carpalis.nl>:
>> vc1_decode_frame assumes that ticks_per_frame is set to two when RFF
>> or RPTFRM is set. When FRAMERATE_FLAG is zero, this may not be the case
>> as the setting of ticks_per_frame is guarded by FRAMERATE_FLAG.
> 
> Is there a specific sample that gets fixed?
> 
> Carl Eugen

Please compare

ffprobe -i SA10160.vc1 -show_packets
and
ffprobe -i SA10161.vc1 -show_packets

SA10160.vc1 repeats each frame by setting RPTFRM to 1 for each frame,
while SA10161.vc1 has RPTFRM set to 0 for each frame. Both files do not
have a framerate encoded (FRAMERATE_FLAG = 0).

Without the patch, both files produce frames with
duration_time=0.040000. With the patch, the SA10160.vc1 file produces
frames with duration_time=0.080000, which is double the duration_time of
the SA10161.vc1 file and, hence, honours the RPTFRM flag.


Regards,
Jerome


More information about the ffmpeg-devel mailing list