[vlc-commits] display: inline vout_display_Delete()
Rémi Denis-Courmont
git at videolan.org
Fri Dec 28 20:33:33 CET 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Dec 28 21:00:49 2018 +0200| [bc1fa7faf44debc8e95b4d3fd7c1fdcc150362e6] | committer: Rémi Denis-Courmont
display: inline vout_display_Delete()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bc1fa7faf44debc8e95b4d3fd7c1fdcc150362e6
---
src/video_output/display.c | 28 ++++++++++++----------------
1 file changed, 12 insertions(+), 16 deletions(-)
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 48baeb6b2f..08716187f3 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -95,20 +95,6 @@ static void vout_display_stop(void *func, va_list ap)
}
/**
- * It deletes a vout_display_t
- */
-static void vout_display_Delete(vout_display_t *vd)
-{
- if (vd->module)
- vlc_module_unload(vd, vd->module, vout_display_stop, vd);
-
- video_format_Clean(&vd->source);
- video_format_Clean(&vd->fmt);
-
- vlc_object_release(vd);
-}
-
-/**
* It controls a vout_display_t
*/
static int vout_display_Control(vout_display_t *vd, int query, ...)
@@ -980,7 +966,12 @@ static vout_display_t *DisplayNew(vout_thread_t *vout,
}
if (VoutDisplayCreateRender(vd)) {
- vout_display_Delete(vd);
+ if (vd->module != NULL)
+ vlc_module_unload(vd, vd->module, vout_display_stop, vd);
+
+ video_format_Clean(&vd->source);
+ video_format_Clean(&vd->fmt);
+ vlc_object_release(vd);
goto error;
}
@@ -1007,7 +998,12 @@ void vout_DeleteDisplay(vout_display_t *vd, vout_display_cfg_t *cfg)
if (osys->pool != NULL)
picture_pool_Release(osys->pool);
- vout_display_Delete(vd);
+ if (vd->module != NULL)
+ vlc_module_unload(vd, vd->module, vout_display_stop, vd);
+
+ video_format_Clean(&vd->source);
+ video_format_Clean(&vd->fmt);
+ vlc_object_release(vd);
vlc_mutex_destroy(&osys->lock);
free(osys);
}
More information about the vlc-commits
mailing list