mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
libs: context: create context first before using it to create surface.
In gst_vaapi_context_reset(), if the context has to be destroyed, make
sure to create it first before allocating its associated surfaces.
This patch fixes a regression introduced in commit 82872f4
because
the formats available in the current context now are ensured before
creating the context's surfaces.
https://bugzilla.gnome.org/show_bug.cgi?id=797277
This commit is contained in:
parent
70726aef00
commit
ecdfc623fd
1 changed files with 2 additions and 2 deletions
|
@ -531,12 +531,12 @@ gst_vaapi_context_reset (GstVaapiContext * context,
|
|||
if (reset_config)
|
||||
context_destroy (context);
|
||||
|
||||
if (reset_config && !(config_create (context) && context_create (context)))
|
||||
return FALSE;
|
||||
if (reset_surfaces && !context_create_surfaces (context))
|
||||
return FALSE;
|
||||
else if (grow_surfaces && !context_ensure_surfaces (context))
|
||||
return FALSE;
|
||||
if (reset_config && !(config_create (context) && context_create (context)))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue