[vlc-devel] [PATCH] vout window: check for NULL on owner's callback resized

Steve Lhomme robux4 at ycbcr.xyz
Tue Aug 20 12:45:40 CEST 2019


On 2019-08-20 12:34, Rémi Denis-Courmont wrote:
> Hi,
> 
> What's the use case for a window whose size is ignored??

At least it would be consistent with the documentation (you wrote):

      * This callback function (if non-NULL) is invoked when the windowing
      * system changes the window size.

> Le 20 août 2019 12:38:59 GMT+03:00, "Maxime ..." <mmeisson at outlook.fr> a écrit :
>> ---
>> include/vlc_vout_window.h | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/vlc_vout_window.h b/include/vlc_vout_window.h
>> index 4e0f3c13a9..9638d882c2 100644
>> --- a/include/vlc_vout_window.h
>> +++ b/include/vlc_vout_window.h
>> @@ -543,7 +543,8 @@ void vout_window_Disable(vout_window_t *window);
>> static inline void vout_window_ReportSize(vout_window_t *window,
>>                                        unsigned width, unsigned height)
>> {
>> -    window->owner.cbs->resized(window, width, height);
>> +    if (window->owner.cbs->resized != NULL)
>> +        window->owner.cbs->resized(window, width, height);
>> }
>>
>> /**
>> -- 
>> 2.17.1
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
> 
> -- 
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
> 
> 
> _______________________________________________
> 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