[vlc-devel] commit: Do not allow input to be found as a child, decoder/generic at all ( Rémi Denis-Courmont )
git version control
git at videolan.org
Mon Jan 18 19:13:42 CET 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jan 18 20:03:34 2010 +0200| [4d6f12afef2e602fa46faf9568125bc0d160f755] | committer: Rémi Denis-Courmont
Do not allow input to be found as a child, decoder/generic at all
This is not needed, and not a good idea.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4d6f12afef2e602fa46faf9568125bc0d160f755
---
src/misc/objects.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/src/misc/objects.c b/src/misc/objects.c
index 5afc444..c904a0d 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);
More information about the vlc-devel
mailing list