diff --git a/subprojects/gst-plugins-bad/gst/rtmp2/gstrtmp2locationhandler.c b/subprojects/gst-plugins-bad/gst/rtmp2/gstrtmp2locationhandler.c index a932a9fe8e..861d5065d7 100644 --- a/subprojects/gst-plugins-bad/gst/rtmp2/gstrtmp2locationhandler.c +++ b/subprojects/gst-plugins-bad/gst/rtmp2/gstrtmp2locationhandler.c @@ -194,7 +194,7 @@ uri_handler_set_uri (GstURIHandler * handler, const gchar * string, gst_uri_normalize (uri); scheme = gst_rtmp_scheme_from_uri (uri); - if (scheme < 0) { + if (scheme == GST_RTMP_SCHEME_ERROR) { g_set_error (error, GST_URI_ERROR, GST_URI_ERROR_BAD_REFERENCE, "URI has bad scheme: %s", string); goto out; diff --git a/subprojects/gst-plugins-bad/gst/rtmp2/rtmp/rtmpclient.c b/subprojects/gst-plugins-bad/gst/rtmp2/rtmp/rtmpclient.c index 38a7b694d7..3f8c624902 100644 --- a/subprojects/gst-plugins-bad/gst/rtmp2/rtmp/rtmpclient.c +++ b/subprojects/gst-plugins-bad/gst/rtmp2/rtmp/rtmpclient.c @@ -103,7 +103,7 @@ gst_rtmp_scheme_from_string (const gchar * string) } } - return -1; + return GST_RTMP_SCHEME_ERROR; } GstRtmpScheme @@ -120,7 +120,7 @@ gst_rtmp_scheme_from_uri (const GstUri * uri) const gchar * gst_rtmp_scheme_to_string (GstRtmpScheme scheme) { - if (scheme >= 0 && scheme < NUM_SCHEMES) { + if (scheme != GST_RTMP_SCHEME_ERROR && scheme < NUM_SCHEMES) { return scheme_strings[scheme]; } diff --git a/subprojects/gst-plugins-bad/gst/rtmp2/rtmp/rtmpclient.h b/subprojects/gst-plugins-bad/gst/rtmp2/rtmp/rtmpclient.h index 523e0697c3..4256359b98 100644 --- a/subprojects/gst-plugins-bad/gst/rtmp2/rtmp/rtmpclient.h +++ b/subprojects/gst-plugins-bad/gst/rtmp2/rtmp/rtmpclient.h @@ -29,6 +29,7 @@ G_BEGIN_DECLS typedef enum { + GST_RTMP_SCHEME_ERROR = -1, GST_RTMP_SCHEME_RTMP = 0, GST_RTMP_SCHEME_RTMPS, } GstRtmpScheme;