[vlc-commits] display: inline VoutDisplayDestroyRender()
Rémi Denis-Courmont
git at videolan.org
Thu Feb 14 17:55:32 CET 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Feb 14 18:54:02 2019 +0200| [851dbc49bef19b5f253c76166c1fd1e8847c8513] | committer: Rémi Denis-Courmont
display: inline VoutDisplayDestroyRender()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=851dbc49bef19b5f253c76166c1fd1e8847c8513
---
src/video_output/display.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 7765e5146c..c5b1703243 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -362,14 +362,6 @@ static int VoutDisplayCreateRender(vout_display_t *vd)
return ret;
}
-static void VoutDisplayDestroyRender(vout_display_t *vd)
-{
- vout_display_priv_t *osys = container_of(vd, vout_display_priv_t, display);
-
- if (osys->converters)
- filter_chain_Delete(osys->converters);
-}
-
void vout_display_SendEventPicturesInvalid(vout_display_t *vd)
{
#ifdef _WIN32
@@ -479,13 +471,16 @@ static void vout_display_Reset(vout_display_t *vd)
{
vout_display_priv_t *osys = container_of(vd, vout_display_priv_t, display);
+ if (osys->converters != NULL) {
+ filter_chain_Delete(osys->converters);
+ osys->converters = NULL;
+ }
+
if (osys->pool != NULL) {
picture_pool_Release(osys->pool);
osys->pool = NULL;
}
- VoutDisplayDestroyRender(vd);
-
if (vout_display_Control(vd, VOUT_DISPLAY_RESET_PICTURES, &osys->cfg,
&vd->fmt)
|| VoutDisplayCreateRender(vd))
@@ -807,7 +802,8 @@ void vout_display_Delete(vout_display_t *vd)
{
vout_display_priv_t *osys = container_of(vd, vout_display_priv_t, display);
- VoutDisplayDestroyRender(vd);
+ if (osys->converters != NULL)
+ filter_chain_Delete(osys->converters);
if (osys->pool != NULL)
picture_pool_Release(osys->pool);
More information about the vlc-commits
mailing list