mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-16 20:36:06 +00:00
queue2: Fix modes in scheduling query handling
Create a new query to send upstream and copy the flags across from it, rather than reusing the same query, as this allows us to prevent use of pull mode when we don't have a download file. Fixes: #629 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/693>
This commit is contained in:
parent
96ac9abb23
commit
146b2ddf50
1 changed files with 7 additions and 2 deletions
|
@ -3490,11 +3490,16 @@ gst_queue2_handle_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
|||
{
|
||||
gboolean pull_mode;
|
||||
GstSchedulingFlags flags = 0;
|
||||
GstQuery *upstream;
|
||||
|
||||
if (!gst_pad_peer_query (queue->sinkpad, query))
|
||||
upstream = gst_query_new_scheduling ();
|
||||
if (!gst_pad_peer_query (queue->sinkpad, upstream)) {
|
||||
gst_query_unref (upstream);
|
||||
goto peer_failed;
|
||||
}
|
||||
|
||||
gst_query_parse_scheduling (query, &flags, NULL, NULL, NULL);
|
||||
gst_query_parse_scheduling (upstream, &flags, NULL, NULL, NULL);
|
||||
gst_query_unref (upstream);
|
||||
|
||||
/* we can operate in pull mode when we are using a tempfile */
|
||||
pull_mode = !QUEUE_IS_USING_QUEUE (queue);
|
||||
|
|
Loading…
Reference in a new issue