projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ecbf070
)
libs: encoder: make sure format array is not NULL when returning TRUE
author
Haihao Xiang
<haihao.xiang@intel.com>
Tue, 31 Mar 2020 04:22:31 +0000
(12:22 +0800)
committer
Haihao Xiang
<haihao.xiang@intel.com>
Tue, 31 Mar 2020 07:03:30 +0000
(15:03 +0800)
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
gst-libs/gst/vaapi/gstvaapiencoder.c
patch
|
blob
|
history
diff --git
a/gst-libs/gst/vaapi/gstvaapiencoder.c
b/gst-libs/gst/vaapi/gstvaapiencoder.c
index
bc2584b
..
2f97bd9
100644
(file)
--- a/
gst-libs/gst/vaapi/gstvaapiencoder.c
+++ b/
gst-libs/gst/vaapi/gstvaapiencoder.c
@@
-1481,9
+1481,13
@@
get_profile_surface_attributes (GstVaapiEncoder * encoder,
return FALSE;
ret = gst_vaapi_context_get_surface_attributes (ctxt, attribs);
- if (ret)
+ if (ret)
{
attribs->formats = gst_vaapi_context_get_surface_formats (ctxt);
+ if (!attribs->formats)
+ ret = FALSE;
+ }
+
gst_vaapi_context_unref (ctxt);
return ret;
}