libs: encoder: continue if roi meta is NULL

Coverity scan bug:

If the function actually returns a null value, a null pointer
dereference will occur.

In gst_vaapi_encoder_ensure_param_roi_regions(): Return value of
function which returns null is dereferenced without checking
parent 9c1f3ad1
Pipeline #34841 passed with stages
in 27 minutes and 33 seconds
......@@ -329,6 +329,8 @@ gst_vaapi_encoder_ensure_param_roi_regions (GstVaapiEncoder * encoder,
roi = (GstVideoRegionOfInterestMeta *)
gst_buffer_iterate_meta_filtered (input, &state,
if (!roi)
/* ignore roi if overflow */
if ((roi->x > G_MAXINT16) || (roi->y > G_MAXINT16)
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