rtmpsrc: Do some sanity checks before accepting an URI

Fixes bug #622369.
This commit is contained in:
Sebastian Dröge 2010-06-23 21:46:42 +02:00
parent 9334e8733c
commit c15487961b

View file

@ -213,7 +213,8 @@ gst_rtmp_src_uri_set_uri (GstURIHandler * handler, const gchar * uri)
unsigned int port; unsigned int port;
AVal playpath, app; AVal playpath, app;
if (!RTMP_ParseURL (uri, &protocol, &host, &port, &playpath, &app)) { if (!RTMP_ParseURL (uri, &protocol, &host, &port, &playpath, &app) ||
!host.av_len || !playpath.av_len) {
GST_ERROR_OBJECT (src, "Failed to parse URI %s", uri); GST_ERROR_OBJECT (src, "Failed to parse URI %s", uri);
return FALSE; return FALSE;
} }