From bfafe7b5821ecec202a57135cb213ce8bb052cf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 15 Apr 2016 13:50:30 +0300 Subject: [PATCH] baseparse: When initializing DTS from PTS, remember that we did so If we don't store the value in prev_dts, we would over and over again initialize the DTS from the last known upstream PTS. If upstream only provides PTS every now and then, then this causes DTS to be rather static. For example in adaptive streaming scenarios this means that all buffers in a fragment will have exactly the same DTS while the PTS is properly updated. As our queues are now preferring to do buffer fill level calculations on DTS, this is causing huge problems there. See https://bugzilla.gnome.org/show_bug.cgi?id=691481#c27 where this part of the code was introduced. https://bugzilla.gnome.org/show_bug.cgi?id=765096 --- libs/gst/base/gstbaseparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c index 2defab9064..a5c3a2943c 100644 --- a/libs/gst/base/gstbaseparse.c +++ b/libs/gst/base/gstbaseparse.c @@ -3180,7 +3180,7 @@ gst_base_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) !GST_CLOCK_TIME_IS_VALID (dts) && !GST_CLOCK_TIME_IS_VALID (parse->priv->prev_dts) && GST_CLOCK_TIME_IS_VALID (pts)) - parse->priv->next_dts = pts; + parse->priv->prev_dts = parse->priv->next_dts = pts; /* always pass all available data */ tmpbuf = gst_adapter_get_buffer (parse->priv->adapter, av);