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 *