oggdemux: remove superfluous check in newsegment event handler
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 16 Sep 2011 19:14:39 +0000 (20:14 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 16 Sep 2011 19:14:39 +0000 (20:14 +0100)
If we get a newsegment event from upstream, we can be quite
sure we're not operating pull-based.

ext/ogg/gstoggdemux.c

index 74cc026..58a1a7c 100644 (file)
@@ -1924,12 +1924,13 @@ gst_ogg_demux_sink_event (GstPad * pad, GstEvent * event)
         gst_event_parse_new_segment_full (event, &update, &rate, &arate,
             &format, &start, &stop, &time);
         if (format == GST_FORMAT_BYTES) {
-          if (!ogg->pullmode) {
-            GST_PUSH_LOCK (ogg);
-            ogg->push_byte_offset = start;
-            ogg->push_last_seek_offset = start;
-            GST_PUSH_UNLOCK (ogg);
-          }
+          GST_PUSH_LOCK (ogg);
+          ogg->push_byte_offset = start;
+          ogg->push_last_seek_offset = start;
+          GST_PUSH_UNLOCK (ogg);
+        } else {
+          GST_WARNING_OBJECT (ogg, "unexpected segment format: %s",
+              gst_format_get_name (format));
         }
       }
       gst_event_unref (event);