[vlc-commits] [Git][videolan/vlc][master] es_out: pause-toggle: handle missing decoder case along with the callback

Steve Lhomme (@robUx4) gitlab at videolan.org
Sat Feb 22 07:48:28 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
d691006b by Khalid Masum at 2025-02-22T07:21:50+00:00
es_out: pause-toggle: handle missing decoder case along with the callback

Currently, if decoder is missing, pre-existing mousecallback is ignored
irrespective of its existence. Which may cause irresponsiveness of
certain interactive videos.

Make sure to use the default MouseEvent callback if demuxer disables
the mouse event, before handling the callback.

- - - - -


1 changed file:

- src/input/es_out.c


Changes:

=====================================
src/input/es_out.c
=====================================
@@ -3660,15 +3660,17 @@ static int EsOutVaControlLocked(es_out_sys_t *p_sys, input_source_t *source,
         p_es->mouse_event_cb = va_arg( args, vlc_mouse_event );
         p_es->mouse_event_userdata = va_arg( args, void * );
 
-        if( p_es->p_dec && p_es->mouse_event_cb )
-            vlc_input_decoder_SetVoutMouseEvent( p_es->p_dec,
-                p_es->mouse_event_cb, p_es->mouse_event_userdata );
-        else /* fallback to player event */
+        if ( !p_es->mouse_event_cb )
         {
+            /* fallback to player event */
             p_es->mouse_event_cb = MouseEventCb;
             p_es->mouse_event_userdata = p_es;
         }
 
+        if( p_es->p_dec )
+            vlc_input_decoder_SetVoutMouseEvent( p_es->p_dec,
+                p_es->mouse_event_cb, p_es->mouse_event_userdata );
+
         return VLC_SUCCESS;
     }
     case ES_OUT_VOUT_ADD_OVERLAY:



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/d691006bf465495744c0033f332124bb989b8c40

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/d691006bf465495744c0033f332124bb989b8c40
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list