[vlc-devel] [PATCH 3/4] qt4: input_manager: check if input is available before use

Hannes Domani ssbssa at yahoo.de
Tue Feb 23 21:17:18 CET 2016


Rémi Denis-Courmont <remi at remlab.net> schrieb am 20:27 Dienstag, 23.Februar 2016:
> Le 2016-02-23 21:13, Hannes Domani a écrit :
> > ---
> >  modules/gui/qt4/input_manager.hpp | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/modules/gui/qt4/input_manager.hpp
> > b/modules/gui/qt4/input_manager.hpp
> > index 57dfd4d..e3d0c44 100644
> > --- a/modules/gui/qt4/input_manager.hpp
> > +++ b/modules/gui/qt4/input_manager.hpp
> > @@ -270,7 +270,7 @@ public:
> >      bool getPlayExitState();
> >      bool hasEmptyPlaylist();
> >
> > -    void requestVoutUpdate() { return im->UpdateVout(); }
> > +    void requestVoutUpdate() { if( im->hasInput() )
> > im->UpdateVout(); }
> 
> Looks racy. Vout can exist without input; that's even necessary for
> vout reuse to work.

The first thing in UpdateVout() is this:
     if( input_Control( p_input, INPUT_GET_VOUTS, &pp_vout, &i_vout ) )

And this crashes if p_input==NULL.


More information about the vlc-devel mailing list