[vlc-devel] Possible bug in Control functions of filters

Greg Farrell greg at gregfarrell.org
Fri Nov 25 14:12:44 CET 2005


   I've had crashes in the control function of the deinterlace filter.
It's a small function, all it does it pass the command down to the
control function of it's child vout.

static int Control( vout_thread_t *p_vout, int i_query, va_list args )
    return vout_vaControl( p_vout->p_sys->p_vout, i_query, args );

However, it doesn't check to make sure that it has a p_sys, or a

I've written code to move/resize windows on the fly, and they use this
vout_Control interface. If I do a "stop" in the rc interface quickly
then do a move/resize i can produce a crash sometimes depending I assume
on the race condition of whether or not the "stop" has destroyed the
child vout yet.

I can fix this by putting in a check of:
if ( p_vout && p_vout->p_sys && p_vout->p_sys->p_vout )

Other filters have the same behaviour. I know the reason I'm running
into this is because I'm doing stuff that isn't part of base vlc, but
should these functions not have the checks for NULL anyway?



This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html

More information about the vlc-devel mailing list