oggdemux: remove superfluous check in newsegment event handler

If we get a newsegment event from upstream, we can be quite
sure we're not operating pull-based.
This commit is contained in:
Tim-Philipp Müller 2011-09-16 20:14:39 +01:00
parent 049e275632
commit 15d8082a55

View file

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