From f27a3e12f6d35695ebbf2edc5aa4937c2e7c3843 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 23 Apr 2013 11:47:54 +0200 Subject: [PATCH] baseparse: Only infer TS if PTS interpolation is enabled Otherwise this is breaking timestamps of formats that need reordering. https://bugzilla.gnome.org/show_bug.cgi?id=597662 --- libs/gst/base/gstbaseparse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c index ba6d37f..c13fa89 100644 --- a/libs/gst/base/gstbaseparse.c +++ b/libs/gst/base/gstbaseparse.c @@ -1989,7 +1989,8 @@ gst_base_parse_handle_and_push_frame (GstBaseParse * parse, /* interpolating and no valid pts yet, * start with dts and carry on from there */ - if (parse->priv->infer_ts && !GST_CLOCK_TIME_IS_VALID (parse->priv->next_pts)) + if (parse->priv->infer_ts && parse->priv->pts_interpolate + && !GST_CLOCK_TIME_IS_VALID (parse->priv->next_pts)) parse->priv->next_pts = parse->priv->next_dts; /* again use default handler to add missing metadata; @@ -2737,6 +2738,7 @@ gst_base_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) * and incoming stuff has PTS but no DTS seen so far, * then pick up DTS from PTS and hope for the best ... */ if (parse->priv->infer_ts && + parse->priv->pts_interpolate && !GST_CLOCK_TIME_IS_VALID (dts) && !GST_CLOCK_TIME_IS_VALID (parse->priv->prev_dts) && GST_CLOCK_TIME_IS_VALID (pts)) -- 2.7.4