[0.10] gstreamer: basesink: don't compensate for render-delay twice

Tim Müller tpm at kemper.freedesktop.org
Thu Jan 5 10:37:38 PST 2012


Module: gstreamer
Branch: 0.10
Commit: 2ae9b1712d71289c2e244768cc5ebce9cb963e5a
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=2ae9b1712d71289c2e244768cc5ebce9cb963e5a

Author: Havard Graff <havard.graff at tandberg.com>
Date:   Tue Nov 29 14:22:44 2011 +0100

basesink: don't compensate for render-delay twice

https://bugzilla.gnome.org/show_bug.cgi?id=667298

---

 libs/gst/base/gstbasesink.c |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c
index 338eeb5..a610e2e 100644
--- a/libs/gst/base/gstbasesink.c
+++ b/libs/gst/base/gstbasesink.c
@@ -2411,8 +2411,7 @@ gst_base_sink_wait_eos (GstBaseSink * sink, GstClockTime time,
     GST_DEBUG_OBJECT (sink, "possibly waiting for clock to reach %"
         GST_TIME_FORMAT, GST_TIME_ARGS (time));
 
-    /* compensate for latency and ts_offset. We don't adjust for render delay
-     * because we don't interact with the device on EOS normally. */
+    /* compensate for latency, ts_offset and render delay */
     stime = gst_base_sink_adjust_time (sink, time);
 
     /* wait for the clock, this can be interrupted because we got shut down or
@@ -2563,14 +2562,6 @@ again:
   /* adjust for latency */
   stime = gst_base_sink_adjust_time (basesink, rstart);
 
-  /* adjust for render-delay, avoid underflows */
-  if (GST_CLOCK_TIME_IS_VALID (stime)) {
-    if (stime > priv->render_delay)
-      stime -= priv->render_delay;
-    else
-      stime = 0;
-  }
-
   /* preroll done, we can sync since we are in PLAYING now. */
   GST_DEBUG_OBJECT (basesink, "possibly waiting for clock to reach %"
       GST_TIME_FORMAT ", adjusted %" GST_TIME_FORMAT,



More information about the gstreamer-commits mailing list