vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Wed Jul 24 22:02:49 2019 +0300| [155e16888bd4f39a7032f620ffcff4022a100c95] | committer: Rémi Denis-Courmont
caca: reorder code > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=155e16888bd4f39a7032f620ffcff4022a100c95 --- modules/video_output/caca.c | 48 ++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/modules/video_output/caca.c b/modules/video_output/caca.c index 117f146523..c88d255482 100644 --- a/modules/video_output/caca.c +++ b/modules/video_output/caca.c @@ -350,6 +350,30 @@ static void Manage(vout_display_t *vd) } /** + * Close a libcaca video output + */ +static void Close(vout_display_t *vd) +{ + vout_display_sys_t *sys = vd->sys; + + if (sys->fifo != NULL) { + vlc_cancel(sys->thread); + vlc_join(sys->thread, NULL); + block_FifoRelease(sys->fifo); + } + if (sys->dither) + cucul_free_dither(sys->dither); + caca_free_display(sys->dp); + cucul_free_canvas(sys->cv); + +#if defined(_WIN32) + FreeConsole(); +#endif + + free(sys); +} + +/** * This function initializes libcaca vout method. */ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg, @@ -500,30 +524,6 @@ error: return VLC_EGENERIC; } -/** - * Close a libcaca video output - */ -static void Close(vout_display_t *vd) -{ - vout_display_sys_t *sys = vd->sys; - - if (sys->fifo != NULL) { - vlc_cancel(sys->thread); - vlc_join(sys->thread, NULL); - block_FifoRelease(sys->fifo); - } - if (sys->dither) - cucul_free_dither(sys->dither); - caca_free_display(sys->dp); - cucul_free_canvas(sys->cv); - -#if defined(_WIN32) - FreeConsole(); -#endif - - free(sys); -} - /***************************************************************************** * Module descriptor *****************************************************************************/ _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
