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

Anton Khirnov anton at khirnov.net
Tue Jul 13 21:16:16 EEST 2021


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.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list