Commit 2515d4dd authored by He Junyan's avatar He Junyan

libs: surface: return fail immediately if can not create subpicture

Part-of: <!331>
parent 6333c853
......@@ -1036,6 +1036,10 @@ gst_vaapi_surface_set_subpictures_from_composition (GstVaapiSurface * surface,
rect = gst_video_overlay_composition_get_rectangle (composition, n);
subpicture = gst_vaapi_subpicture_new_from_overlay_rectangle (display,
rect);
if (subpicture == NULL) {
GST_WARNING ("could not create subpicture for rectangle %p", rect);
return FALSE;
}
gst_video_overlay_rectangle_get_render_rectangle (rect,
(gint *) & sub_rect.x, (gint *) & sub_rect.y,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment