avvidenc: Don't take ffmpeg timestamps verbatim but only use them to calculate DTS
authorSebastian Dröge <sebastian@centricular.com>
Tue, 24 Jan 2023 13:38:20 +0000 (15:38 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 26 Jan 2023 15:47:55 +0000 (15:47 +0000)
commit379c6505eba871d5ab68fd298805e0fee00ec03d
tree72785ca24d281f3b8bb226f53ad1c20e43f832c1
parent1769c5e1771f132219ed3b5abb9a31ff5983f6a2
avvidenc: Don't take ffmpeg timestamps verbatim but only use them to calculate DTS

The ffmpeg timestamps are inaccurate and only in framerate granularity.
To avoid generating inaccurate output timestamps, especially with
variable framerate streams, only use the ffmpeg timestamps for
calculating the DTS.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1544
again.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3808>
subprojects/gst-libav/ext/libav/gstavvidenc.c