mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-07 23:25:52 +00:00
libs: surface: return fail immediately if can not create subpicture
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/331>
This commit is contained in:
parent
6333c85316
commit
2515d4dd2f
|
@ -1036,6 +1036,10 @@ gst_vaapi_surface_set_subpictures_from_composition (GstVaapiSurface * surface,
|
||||||
rect = gst_video_overlay_composition_get_rectangle (composition, n);
|
rect = gst_video_overlay_composition_get_rectangle (composition, n);
|
||||||
subpicture = gst_vaapi_subpicture_new_from_overlay_rectangle (display,
|
subpicture = gst_vaapi_subpicture_new_from_overlay_rectangle (display,
|
||||||
rect);
|
rect);
|
||||||
|
if (subpicture == NULL) {
|
||||||
|
GST_WARNING ("could not create subpicture for rectangle %p", rect);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
gst_video_overlay_rectangle_get_render_rectangle (rect,
|
gst_video_overlay_rectangle_get_render_rectangle (rect,
|
||||||
(gint *) & sub_rect.x, (gint *) & sub_rect.y,
|
(gint *) & sub_rect.x, (gint *) & sub_rect.y,
|
||||||
|
|
Loading…
Reference in a new issue