mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
surface: fix associate subpicture to not report deassociation errors.
This commit is contained in:
parent
bf63fe671f
commit
0634dc768d
1 changed files with 7 additions and 3 deletions
|
@ -648,15 +648,19 @@ gst_vaapi_surface_associate_subpicture(
|
||||||
g_return_val_if_fail(GST_VAAPI_IS_SURFACE(surface), FALSE);
|
g_return_val_if_fail(GST_VAAPI_IS_SURFACE(surface), FALSE);
|
||||||
g_return_val_if_fail(GST_VAAPI_IS_SUBPICTURE(subpicture), FALSE);
|
g_return_val_if_fail(GST_VAAPI_IS_SUBPICTURE(subpicture), FALSE);
|
||||||
|
|
||||||
if (!gst_vaapi_surface_deassociate_subpicture(surface, subpicture))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
if (!surface->priv->subpictures) {
|
if (!surface->priv->subpictures) {
|
||||||
surface->priv->subpictures = g_ptr_array_new();
|
surface->priv->subpictures = g_ptr_array_new();
|
||||||
if (!surface->priv->subpictures)
|
if (!surface->priv->subpictures)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g_ptr_array_remove_fast(surface->priv->subpictures, subpicture)) {
|
||||||
|
success = _gst_vaapi_surface_deassociate_subpicture(surface, subpicture);
|
||||||
|
g_object_unref(subpicture);
|
||||||
|
if (!success)
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
success = _gst_vaapi_surface_associate_subpicture(
|
success = _gst_vaapi_surface_associate_subpicture(
|
||||||
surface,
|
surface,
|
||||||
subpicture,
|
subpicture,
|
||||||
|
|
Loading…
Reference in a new issue