From 1b5895c9365e2c02f65a1a9bdffcee327beaee18 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Fri, 24 Jan 2014 21:58:35 +0100 Subject: [PATCH] avdemux: Don't go into pull mode when the sequential flag is set When the scheduling query results has GST_SCHEDULING_FLAG_SEQUENTIAL set in its flags don't go into pull mode to prevent over-eager seeking. https://bugzilla.gnome.org/show_bug.cgi?id=722935 --- ext/libav/gstavdemux.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/libav/gstavdemux.c b/ext/libav/gstavdemux.c index 1e4ef2f..3e81301 100644 --- a/ext/libav/gstavdemux.c +++ b/ext/libav/gstavdemux.c @@ -1747,6 +1747,7 @@ gst_ffmpegdemux_sink_activate (GstPad * sinkpad, GstObject * parent) { GstQuery *query; gboolean pull_mode; + GstSchedulingFlags flags; query = gst_query_new_scheduling (); @@ -1757,6 +1758,11 @@ gst_ffmpegdemux_sink_activate (GstPad * sinkpad, GstObject * parent) pull_mode = gst_query_has_scheduling_mode_with_flags (query, GST_PAD_MODE_PULL, GST_SCHEDULING_FLAG_SEEKABLE); + + gst_query_parse_scheduling (query, &flags, NULL, NULL, NULL); + if (flags & GST_SCHEDULING_FLAG_SEQUENTIAL) + pull_mode = FALSE; + gst_query_unref (query); if (!pull_mode) -- 2.7.4