curlhttpsrc: Post an error message if no URI was set
authorEdward Hervey <edward@centricular.com>
Tue, 21 Nov 2017 15:30:35 +0000 (16:30 +0100)
committerEdward Hervey <bilboed@bilboed.com>
Tue, 21 Nov 2017 15:30:35 +0000 (16:30 +0100)
Like for other sources

ext/curl/gstcurlhttpsrc.c

index 3933c45..250a46f 100644 (file)
@@ -1262,8 +1262,11 @@ gst_curl_http_src_change_state (GstElement * element, GstStateChange transition)
       gst_curl_http_src_ref_multi (source);
       break;
     case GST_STATE_CHANGE_READY_TO_PAUSED:
-      if (source->uri == NULL)
+      if (source->uri == NULL) {
+        GST_ELEMENT_ERROR (element, RESOURCE, OPEN_READ, (_("No URL set.")),
+            ("Missing URL"));
         return GST_STATE_CHANGE_FAILURE;
+      }
       break;
     case GST_STATE_CHANGE_READY_TO_NULL:
       /* The pipeline has ended, so signal any running request to end. */