Commit 805ddb47 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

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

This reverts commit 3cb4988a.

Conflicts:

	modules/demux/playlist/dvb.c
parent 9ddd70f7
...@@ -109,8 +109,6 @@ static int Demux( demux_t *p_demux ) ...@@ -109,8 +109,6 @@ static int Demux( demux_t *p_demux )
char **ppsz_options = NULL; char **ppsz_options = NULL;
int i_options = 0; int i_options = 0;
char *psz_name = NULL; char *psz_name = NULL;
char *psz_uri = strdup( "dvb://" );
int i_optionslen = 0;
if( !ParseLine( psz_line, &psz_name, &ppsz_options, &i_options ) ) if( !ParseLine( psz_line, &psz_name, &ppsz_options, &i_options ) )
{ {
...@@ -120,33 +118,9 @@ static int Demux( demux_t *p_demux ) ...@@ -120,33 +118,9 @@ static int Demux( demux_t *p_demux )
EnsureUTF8( psz_name ); EnsureUTF8( psz_name );
for( int i = 0; i< i_options; i++ ) for( int i = 0; i< i_options; i++ )
{
EnsureUTF8( ppsz_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 ); i_options, (const char**)ppsz_options, VLC_INPUT_OPTION_TRUSTED, -1 );
input_item_node_AppendItem( p_subitems, p_input ); input_item_node_AppendItem( p_subitems, p_input );
vlc_gc_decref( p_input ); vlc_gc_decref( p_input );
...@@ -155,7 +129,6 @@ static int Demux( demux_t *p_demux ) ...@@ -155,7 +129,6 @@ static int Demux( demux_t *p_demux )
free( ppsz_options[i_options] ); free( ppsz_options[i_options] );
free( ppsz_options ); free( ppsz_options );
free( psz_uri );
free( psz_line ); free( psz_line );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment