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
This commit is contained in:
Sebastian Dröge 2016-04-15 13:50:30 +03:00
parent 428de28c9b
commit 895332e056

View file

@ -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);