mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
Stop iteration if there is no more element to examine.
This commit is contained in:
parent
608d2d071b
commit
bceab0254c
1 changed files with 6 additions and 5 deletions
|
@ -105,12 +105,13 @@ gst_vaapi_video_sink_lookup(GstElement *element)
|
|||
break;
|
||||
|
||||
element = gst_pad_get_parent_element(peer);
|
||||
if (element) {
|
||||
if (GST_VAAPI_IS_VIDEO_SINK(element))
|
||||
sink = GST_VAAPI_VIDEO_SINK(element);
|
||||
g_object_unref(element);
|
||||
}
|
||||
g_object_unref(peer);
|
||||
if (!element)
|
||||
break;
|
||||
|
||||
if (GST_VAAPI_IS_VIDEO_SINK(element))
|
||||
sink = GST_VAAPI_VIDEO_SINK(element);
|
||||
g_object_unref(element);
|
||||
}
|
||||
return sink;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue