mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
Fix destruction order of subpictures. They should be destroyed first.
This commit is contained in:
parent
9713d1a950
commit
c8ec504343
1 changed files with 6 additions and 6 deletions
|
@ -71,6 +71,12 @@ gst_vaapi_surface_destroy(GstVaapiSurface *surface)
|
|||
surface_id = GST_VAAPI_OBJECT_ID(surface);
|
||||
GST_DEBUG("surface %" GST_VAAPI_ID_FORMAT, GST_VAAPI_ID_ARGS(surface_id));
|
||||
|
||||
if (priv->subpictures) {
|
||||
g_ptr_array_foreach(priv->subpictures, destroy_subpicture_cb, NULL);
|
||||
g_ptr_array_free(priv->subpictures, TRUE);
|
||||
priv->subpictures = NULL;
|
||||
}
|
||||
|
||||
if (surface_id != VA_INVALID_SURFACE) {
|
||||
GST_VAAPI_DISPLAY_LOCK(display);
|
||||
status = vaDestroySurfaces(
|
||||
|
@ -83,12 +89,6 @@ gst_vaapi_surface_destroy(GstVaapiSurface *surface)
|
|||
GST_VAAPI_ID_ARGS(surface_id));
|
||||
GST_VAAPI_OBJECT_ID(surface) = VA_INVALID_SURFACE;
|
||||
}
|
||||
|
||||
if (priv->subpictures) {
|
||||
g_ptr_array_foreach(priv->subpictures, destroy_subpicture_cb, NULL);
|
||||
g_ptr_array_free(priv->subpictures, TRUE);
|
||||
priv->subpictures = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
Loading…
Reference in a new issue