wavparse: clean up push mode segment handling
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Fri, 20 Jul 2012 12:10:41 +0000 (14:10 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Fri, 20 Jul 2012 12:10:41 +0000 (14:10 +0200)
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=680277

gst/wavparse/gstwavparse.c

index 8888eeaf3ab28b4044ae8d2cb7bad0d4a9d5d7a7..3090e9bce12e393e4b8d7b9be1236d52e805d1fd 100644 (file)
@@ -846,11 +846,7 @@ gst_wavparse_perform_seek (GstWavParse * wav, GstEvent * event)
     if (!event || wav->state != GST_WAVPARSE_DATA) {
       if (wav->start_segment)
         gst_event_unref (wav->start_segment);
-      // TODO
-/*      wav->start_segment =
-          gst_event_new_new_segment (FALSE, wav->segment.rate,
-          wav->segment.format, wav->segment.last_stop, wav->segment.duration,
-          wav->segment.last_stop);*/
+      wav->start_segment = gst_event_new_segment (&wav->segment);
       res = TRUE;
     } else {
       /* convert seek positions to byte positions in data sections */
@@ -2537,7 +2533,8 @@ gst_wavparse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
       segment.stop = stop;
 
       /* accept upstream's notion of segment and distribute along */
-      segment.time = segment.start = segment.position;
+      segment.format = wav->segment.format;
+      segment.time = segment.position = segment.start;
       segment.duration = wav->segment.duration;
       segment.base = gst_segment_to_running_time (&wav->segment,
           GST_FORMAT_TIME, wav->segment.position);