[gst-cvs] gst-plugins-bad: scaletempo: properly update new segments

Thiago Sousa Santos thiagoss at kemper.freedesktop.org
Thu Nov 5 16:44:45 PST 2009


Module: gst-plugins-bad
Branch: master
Commit: 892555955a0fc175768b7b684b5f00fb34496baf
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=892555955a0fc175768b7b684b5f00fb34496baf

Author: Thiago Santos <thiago.sousa.santos at collabora.co.uk>
Date:   Thu Nov  5 13:40:38 2009 -0300

scaletempo: properly update new segments

Scaletempo was missing an update of 'stop' in
new segment parameters when pushing it downstream,
which caused files to end earlier when rate < 1.

Fixes #599903

Based on patch by: Bastian Hecht <hechtb at gmail.com>

---

 gst/scaletempo/gstscaletempo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gst/scaletempo/gstscaletempo.c b/gst/scaletempo/gstscaletempo.c
index ed25d13..7d72dba 100644
--- a/gst/scaletempo/gstscaletempo.c
+++ b/gst/scaletempo/gstscaletempo.c
@@ -555,7 +555,7 @@ gst_scaletempo_sink_event (GstBaseTransform * trans, GstEvent * event)
       rate = 1.0;
       //gst_event_unref (event);
       event = gst_event_new_new_segment_full (update, rate, applied_rate,
-          format, start, stop, position);
+          format, start, (stop - start) / applied_rate + start, position);
       gst_pad_push_event (GST_BASE_TRANSFORM_SRC_PAD (trans), event);
       return FALSE;
     }





More information about the Gstreamer-commits mailing list