pitch: fix for start times > 0
authorTim-Philipp Müller <tim@centricular.net>
Mon, 22 Oct 2012 20:41:20 +0000 (21:41 +0100)
committerTim-Philipp Müller <tim@centricular.net>
Mon, 22 Oct 2012 20:46:56 +0000 (21:46 +0100)
Fixes buffering and playback of streams that start with
a non-0 timestamp in totem (which has a 'pitch' element
before pulsesink).

Example URI: http://lobostv.lobocast.org.es:8004/lobostv.ogg

Still breaks with chained oggs, on second chain.

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

ext/soundtouch/gstpitch.cc

index 7ce865c..fd36d21 100644 (file)
@@ -667,7 +667,7 @@ gst_pitch_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
 
 /* this function returns FALSE if not enough data is known to transform the
  * segment into proper downstream values.  If the function does return false
- * the sgement should be stalled until enough information is available.
+ * the segment should be stalled until enough information is available.
  * If the funtion returns TRUE, event will be replaced by the new downstream
  * compatible event.
  */
@@ -901,7 +901,7 @@ gst_pitch_change_state (GstElement * element, GstStateChange transition)
     case GST_STATE_CHANGE_NULL_TO_READY:
       break;
     case GST_STATE_CHANGE_READY_TO_PAUSED:
-      pitch->next_buffer_time = 0;
+      pitch->next_buffer_time = GST_CLOCK_TIME_NONE;
       pitch->next_buffer_offset = 0;
       pitch->priv->st->clear ();
       pitch->min_latency = pitch->max_latency = 0;