[vlc-commits] Revert "dvb: demux: generate uri" - fix #6497

Rémi Denis-Courmont git at videolan.org
Tue Mar 27 21:22:06 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Mar 27 22:21:40 2012 +0300| [805ddb47cb0032f471f23232ec01e93d0fb8c8e0] | committer: Rémi Denis-Courmont

Revert "dvb: demux: generate uri" - fix #6497

This reverts commit 3cb4988a9aa6b984ed83ec06fef4ad0546c2d166.

Conflicts:

	modules/demux/playlist/dvb.c

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

 modules/demux/playlist/dvb.c |   29 +----------------------------
 1 files changed, 1 insertions(+), 28 deletions(-)

diff --git a/modules/demux/playlist/dvb.c b/modules/demux/playlist/dvb.c
index 5e71237..ebf778c 100644
--- a/modules/demux/playlist/dvb.c
+++ b/modules/demux/playlist/dvb.c
@@ -109,8 +109,6 @@ static int Demux( demux_t *p_demux )
         char **ppsz_options = NULL;
         int  i_options = 0;
         char *psz_name = NULL;
-        char *psz_uri = strdup( "dvb://" );
-        int i_optionslen = 0;
 
         if( !ParseLine( psz_line, &psz_name, &ppsz_options, &i_options ) )
         {
@@ -120,33 +118,9 @@ static int Demux( demux_t *p_demux )
 
         EnsureUTF8( psz_name );
         for( int i = 0; i< i_options; i++ )
-        {
             EnsureUTF8( ppsz_options[i] );
-            i_optionslen += ( strlen( ppsz_options[i] ) + 2 );
-        }
-
-        if ( i_optionslen )
-        {
-            /* ensure uri is also generated dvb:// :op1 :op2 */
-            char *psz_localuri = calloc( i_optionslen + 6 + 1, sizeof(char) );
-            if ( psz_localuri )
-            {
-                char *psz_tmp;
-                char *psz_forward;
-                psz_forward = strcat( psz_localuri, psz_uri ) + 6;
-                for( int i = 0; i< i_options; i++ )
-                {
-                    psz_tmp = ppsz_options[i]; /* avoid doing i*strcat */
-                    *psz_forward++ = ' ';
-                    *psz_forward++ = ':';
-                    while( *psz_tmp ) *psz_forward++ = *psz_tmp++;
-                }
-                free( psz_uri );
-                psz_uri = psz_localuri;
-            }
-        }
 
-        p_input = input_item_NewExt( psz_uri, psz_name,
+        p_input = input_item_NewExt( "dvb://", psz_name,
                                      i_options, (const char**)ppsz_options, VLC_INPUT_OPTION_TRUSTED, -1 );
         input_item_node_AppendItem( p_subitems, p_input );
         vlc_gc_decref( p_input );
@@ -155,7 +129,6 @@ static int Demux( demux_t *p_demux )
             free( ppsz_options[i_options] );
         free( ppsz_options );
 
-        free( psz_uri );
         free( psz_line );
     }
 



More information about the vlc-commits mailing list