[FFmpeg-devel] [PATCH] frame: add a time_base field

Marton Balint cus at passwd.hu
Wed Sep 8 02:25:41 EEST 2021



On Tue, 7 Sep 2021, Lynne wrote:

> 7 Sept 2021, 19:36 by andreas.rheinhardt at outlook.com:
>
>> Lynne:
>>
>>> This adds a time_base field (currently unused), analogue to the 
>>> AVPacket.time_base field.
>>>
>>> Patch attached. doc/APIchanges and version bump to be done at push time.
>>>
>>> +    /**
>>> +     * Time base for the timestamps in this frame. May be 0, in which case the
>>> +     * time_base from the frame source should be used.
>>> +     */
>>> +    AVRational time_base;

So how this is going to work? Will e.g. avcodec_send_frame check 
the time base of the frame and recalculate pts/duration to the encoder 
time base? Same goes for every function which is receiving frames?

Also I would like to point out that until the actual support for this is 
added to the libraries I don't see why we should add this, because 
sizeof(AVFrame) is not part of the ABI, so this can be added anytime.

Regards,
Marton


More information about the ffmpeg-devel mailing list