From 0a3b584aa0cffa6310de162f0b70f318913d786f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 20 May 2015 10:22:48 +0100 Subject: [PATCH] Revert "oggdemux: Prevent seeks when _SCHEDULING_FLAG_SEQUENTIAL is set" This reverts commit 76647f2710d718e27f207b005956b7dba72c2d19. Avoiding pull mode activation is a feature regression, and demuxers should always use pull mode where that is possible, e.g. if there's an upstream queue2 with a ring buffer or a download buffer. This patch made reverse playback no longer possible over http. If the goal is to minimise seeks, then that can still be done by making the demuxer behave differently in pull mode if the SEQUENTIAL flag is set. If there are bugs, like the demuxer needlessly scanning the entire file on start-up in pull mode, then those should be fixed instead. https://bugzilla.gnome.org/show_bug.cgi?id=746010 --- ext/ogg/gstoggdemux.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index 05ce495bf7..863b759f66 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -4919,8 +4919,7 @@ static gboolean gst_ogg_demux_sink_activate (GstPad * sinkpad, GstObject * parent) { GstQuery *query; - gboolean pull_mode = FALSE; - GstSchedulingFlags flags; + gboolean pull_mode; query = gst_query_new_scheduling (); @@ -4929,13 +4928,8 @@ gst_ogg_demux_sink_activate (GstPad * sinkpad, GstObject * parent) goto activate_push; } - gst_query_parse_scheduling (query, &flags, NULL, NULL, NULL); - - /* Don't use pull mode if sequential access is suggested */ - if (gst_query_has_scheduling_mode (query, GST_PAD_MODE_PULL)) { - pull_mode = (flags & GST_SCHEDULING_FLAG_SEEKABLE) && - !(flags & GST_SCHEDULING_FLAG_SEQUENTIAL); - } + pull_mode = gst_query_has_scheduling_mode_with_flags (query, + GST_PAD_MODE_PULL, GST_SCHEDULING_FLAG_SEEKABLE); gst_query_unref (query); if (!pull_mode)