mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-13 23:22:54 +00:00
rtmp2: Explicitly define scheme error enum
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8229>
This commit is contained in:
parent
3d62f5b57b
commit
6f9f951e83
3 changed files with 4 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ G_BEGIN_DECLS
|
|||
|
||||
typedef enum
|
||||
{
|
||||
GST_RTMP_SCHEME_ERROR = -1,
|
||||
GST_RTMP_SCHEME_RTMP = 0,
|
||||
GST_RTMP_SCHEME_RTMPS,
|
||||
} GstRtmpScheme;
|
||||
|
|
Loading…
Reference in a new issue