Videodecoder PTS&DTS question
Carlos Rafael Giani
dv at pseudoterminal.org
Thu Mar 20 03:13:03 PDT 2014
Hello,
I have noticed that when a frame with valid dts but no valid pts is
pushed downstream with the video decoder finish_frame() call, the
videodecoder class will internally reuse the DTS of the *last* frame for
the PTS. As seen here:
http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/gst-libs/gst/video/gstvideodecoder.c#n2406
I wonder why it is not using the DTS of the current frame. I have a test
video here, with MPEG-4 part 2 encoded data, in an AVI container.
Keyframes have valid PTS, the rest doesn't. The video shows a circle
moving steadily and slowly over the screen. Result: at the keyframes,
the circle "jumps" - playback is not smooth. By checking the PTS prior
to finishing, and using PTS = DTS , the jumps go away.
However, I am not sure doing this check is a good idea in general. Maybe
this is actually covering a bug in the AVI demuxer for example? Opinions?
More information about the gstreamer-devel
mailing list