From 31438ef49b9bf4e4796c49f95cc33c8d4a7c0403 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Fri, 26 Aug 2016 11:30:16 +0100 Subject: [PATCH] oggdemux: safety for failing to determine time length in push mode If we can't find a valid granule near the end of the file, we disable seeking. This guards against the whole file being then read and never going to PLAYING. https://bugzilla.gnome.org/show_bug.cgi?id=770314 --- ext/ogg/gstoggdemux.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index 6f03edd31f..517430ea5f 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -1538,6 +1538,10 @@ gst_ogg_demux_seek_back_after_push_duration_check_unlock (GstOggDemux * ogg) event = ogg->push_mode_seek_delayed_event; ogg->push_mode_seek_delayed_event = NULL; + /* if we haven't learnt about the total time yet, disable seeking */ + if (ogg->total_time == -1) + ogg->push_disable_seeking = TRUE; + ogg->push_state = PUSH_PLAYING; /* If there is one, perform it. Otherwise, seek back at start to start