oggmux: only drop flushing seeks after we started to mux

Don't drop all seek events. It is okay to seek before we send the headers. Non
flushing seeks are okay at any time later as well.
This commit is contained in:
Stefan Sauer 2012-07-10 08:13:02 +02:00
parent 3d8636a662
commit 673dafd09d

View file

@ -521,19 +521,28 @@ static gboolean
gst_ogg_mux_handle_src_event (GstPad * pad, GstObject * parent,
GstEvent * event)
{
GstEventType type;
type = event ? GST_EVENT_TYPE (event) : GST_EVENT_UNKNOWN;
gboolean res = FALSE;
GstOggMux *ogg_mux = GST_OGG_MUX (parent);
GstEventType type = event ? GST_EVENT_TYPE (event) : GST_EVENT_UNKNOWN;
switch (type) {
case GST_EVENT_SEEK:
/* disable seeking for now */
return FALSE;
case GST_EVENT_SEEK:{
GstSeekFlags flags;
gst_event_parse_seek (event, NULL, NULL, &flags, NULL, NULL, NULL, NULL);
if (!ogg_mux->need_headers && (flags & GST_SEEK_FLAG_FLUSH) != 0) {
/* disable flushing seeks once we started */
goto eat;
}
break;
}
default:
break;
}
return gst_pad_event_default (pad, parent, event);
res = gst_pad_event_default (pad, parent, event);
eat:
return res;
}
static GstBuffer *