]> git.sesse.net Git - vlc/commitdiff
* src/video_output/vout_subpictures.c: support for stacking subpictures filters ...
authorGildas Bazin <gbazin@videolan.org>
Sun, 19 Sep 2004 15:11:36 +0000 (15:11 +0000)
committerGildas Bazin <gbazin@videolan.org>
Sun, 19 Sep 2004 15:11:36 +0000 (15:11 +0000)
src/video_output/vout_subpictures.c

index 07a7da88eb43214bcb888520d1c839c6219351b1..a8522d6a71edd22f8a21d3522ac3e45d9b497c2b 100644 (file)
@@ -110,8 +110,13 @@ int spu_Init( spu_t *p_spu )
     var_Create( p_spu, "sub-filter", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
     var_Get( p_spu, "sub-filter", &val );
     psz_filter = psz_filter_orig = val.psz_string;
-    if( psz_filter && *psz_filter )
+    while( psz_filter && *psz_filter )
     {
+        char *psz_parser = strchr( psz_filter, ',' );
+        if( !psz_parser ) psz_parser = strchr( psz_filter, ':' );
+
+        if( psz_parser ) *psz_parser++ = 0;
+
         p_spu->pp_filter[p_spu->i_filter] =
             vlc_object_create( p_spu, VLC_OBJECT_FILTER );
         vlc_object_attach( p_spu->pp_filter[p_spu->i_filter], p_spu );
@@ -134,6 +139,13 @@ int spu_Init( spu_t *p_spu )
             vlc_object_detach( p_spu->pp_filter[p_spu->i_filter] );
             vlc_object_destroy( p_spu->pp_filter[p_spu->i_filter] );
         }
+
+        if( p_spu->i_filter >= 10 )
+        {
+            msg_Dbg( p_spu, "can't add anymore filters" );
+        }
+
+        psz_filter = psz_parser;
     }
     if( psz_filter_orig ) free( psz_filter_orig );