]> git.sesse.net Git - vlc/commitdiff
ogt.c: add object_release for object_find
authorRocky Bernstein <rocky@videolan.org>
Tue, 27 Apr 2004 01:04:53 +0000 (01:04 +0000)
committerRocky Bernstein <rocky@videolan.org>
Tue, 27 Apr 2004 01:04:53 +0000 (01:04 +0000)
cvd.c: if spu-channel variable not set, don't bother handling subtitle.

modules/codec/ogt/cvd.c
modules/codec/ogt/ogt.c

index 3d664889c83fd9f2f0c7eb9dab8281090ddd3065..04423495f3da51afea99cad0856b3f4bc4ef4974 100644 (file)
@@ -245,7 +245,11 @@ Reassemble( decoder_t *p_dec, block_t **pp_block )
 
        if( !p_input ) return NULL;
 
-        var_Get( p_input, "spu-channel", &val );
+       if( var_Get( p_input, "spu-channel", &val ) ) {
+         vlc_object_release( p_input );
+         return NULL;
+       }
+       
         vlc_object_release( p_input );
 
        /* Number could be 0bd, 1bd, 2bd, 3bd for 0..3. If so 
index 9c21d4a724364f892f59cfd4c8f72632ba916753..80b3e8fd2111aecfcd5df1510da8d83138c87655 100644 (file)
@@ -244,10 +244,6 @@ Reassemble( decoder_t *p_dec, block_t **pp_block )
               p_buffer[1], p_buffer[2], p_buffer[3], p_buffer[4],
               p_block->i_buffer);
 
-#if 0
-    if( config_GetInt( p_dec, "spu-channel" ) != p_buffer[1] )
-      return NULL;
-#else
     /* Attach to our input thread and see if subtitle is selected. */
     {
         vlc_object_t * p_input;
@@ -257,8 +253,12 @@ Reassemble( decoder_t *p_dec, block_t **pp_block )
 
        if( !p_input ) return NULL;
 
-        if( var_Get( p_input, "spu-channel", &val ) ) return NULL;
+        if( var_Get( p_input, "spu-channel", &val ) ) {
+         vlc_object_release( p_input );
+          return NULL;
+        }
        
+        vlc_object_release( p_input );
         dbg_print( (DECODE_DBG_PACKET), 
                    "val.i_int %x p_buffer[i] %x", val.i_int, p_buffer[1]);
 
@@ -269,7 +269,6 @@ Reassemble( decoder_t *p_dec, block_t **pp_block )
          return NULL;
         }
     }
-#endif
 
     if ( p_sys->state == SUBTITLE_BLOCK_EMPTY ) {
       i_expected_image  = p_sys->i_image+1;