[FFmpeg-devel] [PATCH] avpacket: ABI bump additions

Lynne dev at lynne.ee
Wed Jul 14 11:45:03 EEST 2021


13 Jul 2021, 20:16 by anton at khirnov.net:

> Quoting Lynne (2021-07-09 04:42:07)
>
>>
>> I can change the patch to either initialize it as an invalid value (which would
>> signal the user to instead get the timebase elsewhere) or set its value
>> when the packet passes through the common demuxing function.
>> Having this field in does not imply it's used during muxing at all, and in fact
>> makes it easier to figure out how to properly mux since we can add the info
>> to the comment (which we will have to, regardless of how we decide to implement
>> the automatic method for timestamp rescaling, if we ever do decide to).
>>
>
> I am generally in favor of having the timebase in the packets, but there
> are tricky compatibility issues to consider.
>
> E.g. consider a case where a user:
> 1 reads packets from an encoder
> 2 rescales them to the muxer timebase manually
> 3 submits them to the muxer
>
> If we change encoders to set packet timebase and the muxers to honor it,
> then step 2 above will break. There are some ways around it (e.g. adding
> honor_packet_tb options to each component that deals with AVPackets,
> then gradually making them on by default, then removing the options),
> but it's a long game.
>

We discussed this back in February, and I'm going for the long game, with
a flag instead of an option. The flag won't be removed, there should still
be an option for API users to not have our code touch timestamps. It'll just
be made the default at some later bump, with a new flag introduced to
restore old behaviour.


More information about the ffmpeg-devel mailing list