[vlc-commits] Input resource: allow operation without input

Rémi Denis-Courmont git at videolan.org
Mon Apr 4 19:41:41 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Apr  4 17:45:06 2011 +0300| [f137e017a67afe2cd70f3b407ea2be41359a97be] | committer: Rémi Denis-Courmont

Input resource: allow operation without input

This breaks SPU but at least video and audio should work.

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

 src/input/resource.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/input/resource.c b/src/input/resource.c
index f683e61..fcf32ef 100644
--- a/src/input/resource.c
+++ b/src/input/resource.c
@@ -95,7 +95,6 @@ static sout_instance_t *RequestSout( input_resource_t *p_resource,
         return NULL;
     }
 
-    assert( p_resource->p_input );
     assert( !p_sout || ( !p_resource->p_sout && !psz_sout ) );
 
     /* Check the validity of the sout */
@@ -149,7 +148,8 @@ static void DestroyVout( input_resource_t *p_resource )
 static void DisplayVoutTitle( input_resource_t *p_resource,
                               vout_thread_t *p_vout )
 {
-    assert( p_resource->p_input );
+    if( p_resource->p_input == NULL )
+        return;
 
     /* TODO display the title only one time for the same input ? */
 
@@ -206,7 +206,6 @@ static vout_thread_t *RequestVout( input_resource_t *p_resource,
         return NULL;
     }
 
-    assert( p_resource->p_input );
     if( p_fmt )
     {
         /* */
@@ -333,7 +332,6 @@ static void DestroyAout( input_resource_t *p_resource )
 static aout_instance_t *RequestAout( input_resource_t *p_resource, aout_instance_t *p_aout )
 {
     vlc_assert_locked( &p_resource->lock );
-    assert( p_resource->p_input );
 
     if( p_aout )
     {



More information about the vlc-commits mailing list