matroska-demux: Don't handle seek until ready

https://bugzilla.gnome.org/show_bug.cgi?id=762542
This commit is contained in:
Linus Svensson 2016-02-23 15:57:18 +01:00 committed by Sebastian Dröge
parent 1a3986d016
commit a5691af319

View file

@ -1578,6 +1578,12 @@ gst_matroska_demux_element_send_event (GstElement * element, GstEvent * event)
g_return_val_if_fail (event != NULL, FALSE);
if (GST_EVENT_TYPE (event) == GST_EVENT_SEEK) {
/* no seeking until we are (safely) ready */
if (demux->common.state != GST_MATROSKA_READ_STATE_DATA) {
GST_DEBUG_OBJECT (demux, "not ready for seeking yet");
gst_event_unref (event);
return FALSE;
}
res = gst_matroska_demux_handle_seek_event (demux, NULL, event);
} else {
GST_WARNING_OBJECT (demux, "Unhandled event of type %s",