[vlc-devel] commit: Fixed input_GetEsObjects(). (Laurent Aimar )

git version control git at videolan.org
Sun Jan 31 12:23:44 CET 2010


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Jan 31 02:06:46 2010 +0100| [2b1d6c0066c73299743eafce095cffa6cef899ee] | committer: Laurent Aimar 

Fixed input_GetEsObjects().

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2b1d6c0066c73299743eafce095cffa6cef899ee
---

 src/input/decoder.c |    4 ++--
 src/input/es_out.c  |    8 +++++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 5a0ef02..5d3a57c 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -631,9 +631,9 @@ void input_DecoderGetObjects( decoder_t *p_dec,
 
     vlc_mutex_lock( &p_owner->lock );
     if( pp_vout )
-        *pp_vout = vlc_object_hold( p_owner->p_vout );
+        *pp_vout = p_owner->p_vout ? vlc_object_hold( p_owner->p_vout ) : NULL;
     if( pp_aout )
-        *pp_aout = vlc_object_hold( p_owner->p_aout );
+        *pp_aout = p_owner->p_aout ? vlc_object_hold( p_owner->p_aout ) : NULL;
     vlc_mutex_unlock( &p_owner->lock );
 }
 
diff --git a/src/input/es_out.c b/src/input/es_out.c
index 8e7419a..ccfa5a0 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -2470,14 +2470,16 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
             vlc_object_t    **pp_decoder = va_arg( args, vlc_object_t ** );
             vout_thread_t   **pp_vout    = va_arg( args, vout_thread_t ** );
             aout_instance_t **pp_aout    = va_arg( args, aout_instance_t ** );
-            if( es->p_dec )
+            if( p_es->p_dec )
             {
                 if( pp_decoder )
-                    *pp_decoder = vlc_object_hold( es->p_dec );
-                input_DecoderGetObjects( es->p_dec, pp_vout, pp_aout );
+                    *pp_decoder = vlc_object_hold( p_es->p_dec );
+                input_DecoderGetObjects( p_es->p_dec, pp_vout, pp_aout );
             }
             else
             {
+                if( pp_decoder )
+                    *pp_decoder = NULL;
                 if( pp_vout )
                     *pp_vout = NULL;
                 if( pp_aout )




More information about the vlc-devel mailing list