mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
libs: encoder: make sure format array is not NULL when returning TRUE
This fixed segfault when running the pipeline below with iHD driver (commit efe5e9a) on ICL gst-launch-1.0 videotestsrc ! vaapivp9enc tune=low-power ! vaapivp9dec ! \ fakesink
This commit is contained in:
parent
ecbf070fa4
commit
f680a8cba1
1 changed files with 5 additions and 1 deletions
|
@ -1481,9 +1481,13 @@ get_profile_surface_attributes (GstVaapiEncoder * encoder,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
ret = gst_vaapi_context_get_surface_attributes (ctxt, attribs);
|
ret = gst_vaapi_context_get_surface_attributes (ctxt, attribs);
|
||||||
if (ret)
|
if (ret) {
|
||||||
attribs->formats = gst_vaapi_context_get_surface_formats (ctxt);
|
attribs->formats = gst_vaapi_context_get_surface_formats (ctxt);
|
||||||
|
|
||||||
|
if (!attribs->formats)
|
||||||
|
ret = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
gst_vaapi_context_unref (ctxt);
|
gst_vaapi_context_unref (ctxt);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue