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
This commit is contained in:
Sjoerd Simons 2014-01-24 21:58:35 +01:00
parent 520221c47a
commit 1b5895c936

View file

@ -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)