]> git.sesse.net Git - vlc/commitdiff
Fixed input_GetEsObjects().
authorLaurent Aimar <fenrir@videolan.org>
Sun, 31 Jan 2010 01:06:46 +0000 (02:06 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 31 Jan 2010 11:21:55 +0000 (12:21 +0100)
src/input/decoder.c
src/input/es_out.c

index 5a0ef0293ea3bc8b04682eaa0ed443a8c775e827..5d3a57c3d8c87773a306bf67e9fcb3253d4ba554 100644 (file)
@@ -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 );
 }
 
index 8e7419aaac84954ce0944b5cf346dff18f2cffc4..ccfa5a02a019b5af29f4b65e8f114deb331a8e32 100644 (file)
@@ -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 )