mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +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,
|
gst_navigation_message_parse_mouse_over (GstMessage * message,
|
||||||
gboolean * active)
|
gboolean * active)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GST_NAVIGATION_MESSAGE_HAS_TYPE (message, MOUSE_OVER),
|
if (!GST_NAVIGATION_MESSAGE_HAS_TYPE (message, MOUSE_OVER))
|
||||||
FALSE);
|
return FALSE;
|
||||||
|
|
||||||
if (active) {
|
if (active) {
|
||||||
const GstStructure *s = gst_message_get_structure (message);
|
const GstStructure *s = gst_message_get_structure (message);
|
||||||
g_return_val_if_fail (gst_structure_get_boolean (s, "active", active),
|
if (gst_structure_get_boolean (s, "active", active) == FALSE)
|
||||||
FALSE);
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -707,7 +707,8 @@ gst_v4lsrc_buffer_new (GstV4lSrc * v4lsrc, gint num)
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (v4lsrc, "creating buffer for frame %d", 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);
|
buf = (GstBuffer *) gst_mini_object_new (GST_TYPE_V4LSRC_BUFFER);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue