mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 10:25:33 +00:00
navigation/v4l: Don't use g_return_val_if_fail for computed/used values.
This commit is contained in:
parent
219fe22293
commit
2555eeb737
2 changed files with 6 additions and 5 deletions
|
@ -520,13 +520,13 @@ gboolean
|
|||
gst_navigation_message_parse_mouse_over (GstMessage * message,
|
||||
gboolean * active)
|
||||
{
|
||||
g_return_val_if_fail (GST_NAVIGATION_MESSAGE_HAS_TYPE (message, MOUSE_OVER),
|
||||
FALSE);
|
||||
if (!GST_NAVIGATION_MESSAGE_HAS_TYPE (message, MOUSE_OVER))
|
||||
return FALSE;
|
||||
|
||||
if (active) {
|
||||
const GstStructure *s = gst_message_get_structure (message);
|
||||
g_return_val_if_fail (gst_structure_get_boolean (s, "active", active),
|
||||
FALSE);
|
||||
if (gst_structure_get_boolean (s, "active", active) == FALSE)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
|
|
@ -707,7 +707,8 @@ gst_v4lsrc_buffer_new (GstV4lSrc * v4lsrc, gint num)
|
|||
|
||||
GST_DEBUG_OBJECT (v4lsrc, "creating buffer for frame %d", num);
|
||||
|
||||
g_return_val_if_fail (gst_v4lsrc_get_fps (v4lsrc, &fps_n, &fps_d), NULL);
|
||||
if (!(gst_v4lsrc_get_fps (v4lsrc, &fps_n, &fps_d)))
|
||||
return NULL;
|
||||
|
||||
buf = (GstBuffer *) gst_mini_object_new (GST_TYPE_V4LSRC_BUFFER);
|
||||
|
||||
|
|
Loading…
Reference in a new issue