mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 19:42:26 +00:00
baseparse: fix invalid output timestamps in some cases
This commit is contained in:
parent
fac7eb0a50
commit
4a1ff7fa95
1 changed files with 3 additions and 4 deletions
|
@ -2664,10 +2664,11 @@ gst_base_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
|||
* but interpolate in between */
|
||||
pts = gst_adapter_prev_pts (parse->priv->adapter, NULL);
|
||||
dts = gst_adapter_prev_dts (parse->priv->adapter, NULL);
|
||||
if (GST_CLOCK_TIME_IS_VALID (pts) && (parse->priv->prev_pts != pts)) {
|
||||
if (GST_CLOCK_TIME_IS_VALID (pts) && (parse->priv->prev_pts != pts))
|
||||
parse->priv->prev_pts = parse->priv->next_pts = pts;
|
||||
|
||||
if (GST_CLOCK_TIME_IS_VALID (dts) && (parse->priv->prev_dts != dts))
|
||||
parse->priv->prev_dts = parse->priv->next_dts = dts;
|
||||
}
|
||||
|
||||
/* always pass all available data */
|
||||
data = gst_adapter_map (parse->priv->adapter, av);
|
||||
|
@ -2675,8 +2676,6 @@ gst_base_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
|||
* since what is passed is tied to the adapter */
|
||||
tmpbuf = gst_buffer_new_wrapped_full (GST_MEMORY_FLAG_READONLY |
|
||||
GST_MEMORY_FLAG_NO_SHARE, (gpointer) data, av, 0, av, NULL, NULL);
|
||||
GST_BUFFER_DTS (tmpbuf) = dts;
|
||||
GST_BUFFER_PTS (tmpbuf) = pts;
|
||||
|
||||
/* keep the adapter mapped, so keep track of what has to be flushed */
|
||||
ret = gst_base_parse_handle_buffer (parse, tmpbuf, &skip, &flush);
|
||||
|
|
Loading…
Reference in a new issue