summaryrefslogtreecommitdiff
path: root/gst/playback/gsturidecodebin.c
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2019-05-16 08:53:51 +0100
committerTim-Philipp Müller <tim@centricular.com>2019-05-22 09:55:08 +0100
commitb87f830700235bb4a349607bc23dd05c1e301964 (patch)
treee5b81f1dd195ed51ce125a05d255d470b1f251d9 /gst/playback/gsturidecodebin.c
parent51f2d05ff6aa768e68fc06f5d57bd384a5eba2c2 (diff)
uridecodebin, urisourcebin: fix buffering for ssh:// URIs
Protocols that are in the stream_uris list should always be streams, no matter what they respond to the scheduling query. The flag in the scheduling query is just another way to declare something that needs buffering without the whitelist, the absence of the flag shouldn't make us ignore our known protocol list. Also set is_stream always to a boolean and not a mask value.
Diffstat (limited to 'gst/playback/gsturidecodebin.c')
-rw-r--r--gst/playback/gsturidecodebin.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gst/playback/gsturidecodebin.c b/gst/playback/gsturidecodebin.c
index 6428f0b31..943b3e75a 100644
--- a/gst/playback/gsturidecodebin.c
+++ b/gst/playback/gsturidecodebin.c
@@ -1310,12 +1310,14 @@ gen_source_element (GstURIDecodeBin * decoder)
GST_LOG_OBJECT (decoder, "found source type %s", G_OBJECT_TYPE_NAME (source));
+ decoder->is_stream = IS_STREAM_URI (decoder->uri);
+
query = gst_query_new_scheduling ();
if (gst_element_query (source, query)) {
gst_query_parse_scheduling (query, &flags, NULL, NULL, NULL);
- decoder->is_stream = flags & GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED;
- } else
- decoder->is_stream = IS_STREAM_URI (decoder->uri);
+ if ((flags & GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED))
+ decoder->is_stream = TRUE;
+ }
gst_query_unref (query);
GST_LOG_OBJECT (decoder, "source is stream: %d", decoder->is_stream);