mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
codectimestamper: never set DTS to NONE
If we want to avoid the DTS going backward, then we can set DTS to last_dts as a last resort. Log a warning in this case Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7033>
This commit is contained in:
parent
f4852a2d8b
commit
bb726c7eef
1 changed files with 5 additions and 2 deletions
|
@ -444,8 +444,11 @@ gst_codec_timestamper_output_frame (GstCodecTimestamper * self,
|
||||||
if (dts > frame->pts) {
|
if (dts > frame->pts) {
|
||||||
if (frame->pts >= priv->last_dts)
|
if (frame->pts >= priv->last_dts)
|
||||||
dts = frame->pts;
|
dts = frame->pts;
|
||||||
else
|
else {
|
||||||
dts = GST_CLOCK_TIME_NONE;
|
GST_WARNING_OBJECT (self,
|
||||||
|
"Setting DTS to last DTS to avoid PTS < DTS and backward DTS");
|
||||||
|
dts = priv->last_dts;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GST_CLOCK_TIME_IS_VALID (dts))
|
if (GST_CLOCK_TIME_IS_VALID (dts))
|
||||||
|
|
Loading…
Reference in a new issue