mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
oggdemux: Prevent seeks when _SCHEDULING_FLAG_SEQUENTIAL is set
Don't go into pull mode when the upstream scheduling flags indicate seeks should be avoided by setting GST_SCHEDULING_FLAG_SEQUENTIAL. https://bugzilla.gnome.org/show_bug.cgi?id=704929
This commit is contained in:
parent
8cda9e3ef0
commit
76647f2710
1 changed files with 9 additions and 3 deletions
|
@ -4586,7 +4586,8 @@ static gboolean
|
||||||
gst_ogg_demux_sink_activate (GstPad * sinkpad, GstObject * parent)
|
gst_ogg_demux_sink_activate (GstPad * sinkpad, GstObject * parent)
|
||||||
{
|
{
|
||||||
GstQuery *query;
|
GstQuery *query;
|
||||||
gboolean pull_mode;
|
gboolean pull_mode = FALSE;
|
||||||
|
GstSchedulingFlags flags;
|
||||||
|
|
||||||
query = gst_query_new_scheduling ();
|
query = gst_query_new_scheduling ();
|
||||||
|
|
||||||
|
@ -4595,8 +4596,13 @@ gst_ogg_demux_sink_activate (GstPad * sinkpad, GstObject * parent)
|
||||||
goto activate_push;
|
goto activate_push;
|
||||||
}
|
}
|
||||||
|
|
||||||
pull_mode = gst_query_has_scheduling_mode_with_flags (query,
|
gst_query_parse_scheduling (query, &flags, NULL, NULL, NULL);
|
||||||
GST_PAD_MODE_PULL, GST_SCHEDULING_FLAG_SEEKABLE);
|
|
||||||
|
/* 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);
|
||||||
|
}
|
||||||
gst_query_unref (query);
|
gst_query_unref (query);
|
||||||
|
|
||||||
if (!pull_mode)
|
if (!pull_mode)
|
||||||
|
|
Loading…
Reference in a new issue