On Wed Nov 12 15:10:20 2025 +0000, Rémi Bernon wrote:
Can we use `AVFMT_FLAG_GENPTS` `AVFormatContext` flag instead? It looks like it's meant to do that, and probably better than us. This seems to generate timestamps that are offset by +0.0333666 (i.e. the duration of a sample) while otherwise entirely correct.
The culprit seems to be this line in ffmpeg https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavformat/demux.c#l158... that waits for a packet with a larger stream index to populate the missing pts from its dts. However, this gave me the idea of simply using the decode timestamp as a fallback for sample time if pts is not present, which gives us the expected timestamps in this test. What do you think? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8505#note_121688