mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 16:08:51 +00:00
msdkenc: fix error handling in case of unsupported hardware
Check the return value of gst_msdk_context_ensure_context and abort in case of failure. https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/945
This commit is contained in:
parent
9b19968a66
commit
e766aaf2b1
1 changed files with 3 additions and 3 deletions
|
@ -1422,9 +1422,9 @@ gst_msdkenc_start (GstVideoEncoder * encoder)
|
||||||
gst_msdk_context_add_job_type (thiz->context, GST_MSDK_JOB_ENCODER);
|
gst_msdk_context_add_job_type (thiz->context, GST_MSDK_JOB_ENCODER);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
gst_msdk_context_ensure_context (GST_ELEMENT_CAST (thiz), thiz->hardware,
|
if (!gst_msdk_context_ensure_context (GST_ELEMENT_CAST (thiz),
|
||||||
GST_MSDK_JOB_ENCODER);
|
thiz->hardware, GST_MSDK_JOB_ENCODER))
|
||||||
|
return FALSE;
|
||||||
GST_INFO_OBJECT (thiz, "Creating new context %" GST_PTR_FORMAT,
|
GST_INFO_OBJECT (thiz, "Creating new context %" GST_PTR_FORMAT,
|
||||||
thiz->context);
|
thiz->context);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue