mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
decoder: fix memory leak of VA objects on exit.
On sequence end, if the last decoded picture is not output for rendering, then the proxy surface is not created. In this case, the original surface must be released explicitly to the context.
This commit is contained in:
parent
11d09495ea
commit
399875ee86
1 changed files with 4 additions and 1 deletions
|
@ -75,7 +75,10 @@ gst_vaapi_picture_destroy(GstVaapiPicture *picture)
|
|||
g_object_unref(picture->proxy);
|
||||
picture->proxy = NULL;
|
||||
}
|
||||
|
||||
else if (picture->surface) {
|
||||
/* Explicitly release any surface that was not bound to a proxy */
|
||||
gst_vaapi_context_put_surface(GET_CONTEXT(picture), picture->surface);
|
||||
}
|
||||
picture->surface_id = VA_INVALID_ID;
|
||||
picture->surface = NULL;
|
||||
|
||||
|
|
Loading…
Reference in a new issue