mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-02 06:31: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/6977>
This commit is contained in:
parent
27662d5fb8
commit
deed29732b
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