mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
libs: context: skip VAContext if no frame size
If GstVaapiContextInfo has just initial information, without frame's width and height, skip the creation of the VAContext, just keep the VAConfig. https://bugzilla.gnome.org/show_bug.cgi?id=769266 Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
This commit is contained in:
parent
059cc59a29
commit
41d27b5e2e
1 changed files with 10 additions and 2 deletions
|
@ -389,8 +389,6 @@ gst_vaapi_context_new (GstVaapiDisplay * display,
|
|||
|
||||
g_return_val_if_fail (cip->profile, NULL);
|
||||
g_return_val_if_fail (cip->entrypoint, NULL);
|
||||
g_return_val_if_fail (cip->width > 0, NULL);
|
||||
g_return_val_if_fail (cip->height > 0, NULL);
|
||||
|
||||
context = gst_vaapi_object_new (gst_vaapi_context_class (), display);
|
||||
if (!context)
|
||||
|
@ -401,8 +399,18 @@ gst_vaapi_context_new (GstVaapiDisplay * display,
|
|||
if (!config_create (context))
|
||||
goto error;
|
||||
|
||||
/* this means we don't want to create a VAcontext */
|
||||
if (cip->width == 0 && cip->height == 0)
|
||||
goto done;
|
||||
|
||||
/* this is not valid */
|
||||
if (cip->width == 0 || cip->height == 0)
|
||||
goto error;
|
||||
|
||||
if (!context_create (context))
|
||||
goto error;
|
||||
|
||||
done:
|
||||
return context;
|
||||
|
||||
/* ERRORS */
|
||||
|
|
Loading…
Reference in a new issue