mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
msdkdec: 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
e766aaf2b1
commit
670481bdeb
1 changed files with 3 additions and 2 deletions
|
@ -675,8 +675,9 @@ gst_msdkdec_start (GstVideoDecoder * decoder)
|
||||||
gst_msdk_context_add_job_type (thiz->context, GST_MSDK_JOB_DECODER);
|
gst_msdk_context_add_job_type (thiz->context, GST_MSDK_JOB_DECODER);
|
||||||
}
|
}
|
||||||
} 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_DECODER);
|
thiz->hardware, GST_MSDK_JOB_DECODER))
|
||||||
|
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