[FFmpeg-devel] [PATCH] frame: add a time_base field
Lynne
dev at lynne.ee
Thu Sep 9 13:41:08 EEST 2021
9 Sept 2021, 12:02 by george at nsup.org:
> Marton Balint (12021-09-08):
>
>> 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?
>>
>
>
> Thanks for raising this question.
>
> If we add this field without being very clear on its semantic, then
> different parts of the code and applications will quickly start making
> slightly different assumptions on it, and the result will be more
> complexity but little benefit since we cannot assume the code does the
> right thing. And we will have to support it until we decide on an API
> break.
>
Did you read what I wrote? I think I was very clear.
It's an output, unless a specific flag is set to accept it as an input.
API users don't have to maintain it without the flag set.
It helps solve the problem of piping timebases for API users
who isolate all of their contexts and only relay frames throughout,
without them needing to use the opaque fields.
We already have the same field for AVPackets, so not introducing
one for frames would make no sense.
More information about the ffmpeg-devel
mailing list