From: RĂ©mi Denis-Courmont Date: Mon, 18 Jan 2010 18:03:34 +0000 (+0200) Subject: Do not allow input to be found as a child, decoder/generic at all X-Git-Tag: 1.1.0-ff~1120 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=4d6f12afef2e602fa46faf9568125bc0d160f755;p=vlc Do not allow input to be found as a child, decoder/generic at all This is not needed, and not a good idea. --- diff --git a/src/misc/objects.c b/src/misc/objects.c index 5afc444bca..c904a0d0bf 100644 --- a/src/misc/objects.c +++ b/src/misc/objects.c @@ -452,6 +452,21 @@ void * __vlc_object_find( vlc_object_t *p_this, int i_type, int i_mode ) if (i_mode == FIND_ANYWHERE) return vlc_object_find (p_this->p_libvlc, i_type, FIND_CHILD); + switch (i_type) + { + case VLC_OBJECT_VOUT: + case VLC_OBJECT_AOUT: + break; + case VLC_OBJECT_INPUT: + /* input can only be accessed like this from children, + * otherwise we could not promise that it is initialized */ + if (i_mode != FIND_PARENT) + return NULL; + break; + default: + return NULL; + } + libvlc_lock (p_this->p_libvlc); p_found = FindObject( p_this, i_type, i_mode ); libvlc_unlock (p_this->p_libvlc);