[vlc-devel] [PATCH v4 1/5] display: allow a NULL deactivate function
Steve Lhomme
robux4 at ycbcr.xyz
Wed Jul 10 11:28:39 CEST 2019
On 2019-07-10 11:18, Alexandre Janniaux wrote:
> Hi,
>
> This seems already tackled by vlc_module_unload.
Ah yes, I was wondering how it was possible for things to work when we
have so many Close set to NULL.
Forget this patch then.
>
> ```
> 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
> _______________________________________________
> 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