[vlc-devel] [PATCH v4 1/5] display: allow a NULL deactivate function
Alexandre Janniaux
ajanni at videolabs.io
Wed Jul 10 11:18:37 CEST 2019
Hi,
This seems already tackled by vlc_module_unload.
```
void vlc_module_unload(module_t *module, vlc_deactivate_t deinit, ...)
{
if (module->pf_deactivate != NULL)
{
va_list ap;
va_start(ap, deinit);
deinit(module->pf_deactivate, ap);
va_end(ap);
}
}
```
On Wed, Jul 10, 2019 at 10:39:04AM +0200, Steve Lhomme wrote:
> As used in vdummy.c since 0f600e2e215fc29970e60960d584b034bc6fa8e4
> ---
> src/video_output/display.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/src/video_output/display.c b/src/video_output/display.c
> index 2173bb084e..4520780493 100644
> --- a/src/video_output/display.c
> +++ b/src/video_output/display.c
> @@ -89,9 +89,12 @@ static int vout_display_start(void *func, bool forced, va_list ap)
>
> static void vout_display_stop(void *func, va_list ap)
> {
> - vout_display_close_cb deactivate = func;
> + if (func)
> + {
> + vout_display_close_cb deactivate = func;
>
> - deactivate(va_arg(ap, vout_display_t *));
> + deactivate(va_arg(ap, vout_display_t *));
> + }
> }
>
> /* */
> --
> 2.17.1
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list