mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 08:55:33 +00:00
streams: gst_stream_type_get_name() is not nullable
It takes an enum and only the defined values are valid to pass in here as it's not extensible from the outside. Add a g_return_val_if_reached() for the unreachable case and return "invalid". Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/713>
This commit is contained in:
parent
12937488ae
commit
877f2b6800
1 changed files with 3 additions and 4 deletions
|
@ -543,7 +543,7 @@ gst_stream_get_property (GObject * object, guint prop_id,
|
||||||
*
|
*
|
||||||
* Get a descriptive string for a given #GstStreamType
|
* Get a descriptive string for a given #GstStreamType
|
||||||
*
|
*
|
||||||
* Returns: (nullable): A string describing the stream type
|
* Returns: A string describing the stream type
|
||||||
*
|
*
|
||||||
* Since: 1.10
|
* Since: 1.10
|
||||||
*/
|
*/
|
||||||
|
@ -563,8 +563,7 @@ gst_stream_type_get_name (GstStreamType stype)
|
||||||
case GST_STREAM_TYPE_TEXT:
|
case GST_STREAM_TYPE_TEXT:
|
||||||
return "text";
|
return "text";
|
||||||
default:
|
default:
|
||||||
return NULL;
|
g_return_val_if_reached ("invalid");
|
||||||
|
return "invalid";
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue