mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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:
parent
3d8636a662
commit
673dafd09d
1 changed files with 16 additions and 7 deletions
|
@ -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 *
|
||||
|
|
Loading…
Reference in a new issue