curlhttpsrc: Post an error message if no URI was set

Like for other sources
This commit is contained in:
Edward Hervey 2017-11-21 16:30:35 +01:00 committed by Edward Hervey
parent 69d794b004
commit d4afba794a

View 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. */