/*****************************************************************************
* dvb.c : DVB channel list import (szap/tzap/czap compatible channel lists)
*****************************************************************************
- * Copyright (C) 2005 the VideoLAN team
+ * Copyright (C) 2005-20009 the VideoLAN team
* $Id$
*
* Authors: Gildas Bazin <gbazin@videolan.org>
#include <vlc_common.h>
#include <vlc_demux.h>
-#include <vlc_interface.h>
#include <vlc_charset.h>
#include "playlist.h"
input_item_t *p_input;
input_item_t *p_current_input = GetCurrentItem(p_demux);
+ input_item_node_t *p_subitems = input_item_node_Create( p_current_input );
+
while( (psz_line = stream_ReadLine( p_demux->s )) )
{
char **ppsz_options = NULL;
p_input = input_item_NewExt( p_demux, "dvb://", psz_name,
i_options, (const char**)ppsz_options, VLC_INPUT_OPTION_TRUSTED, -1 );
- input_item_AddSubItem( p_current_input, p_input );
+ input_item_node_AppendItem( p_subitems, p_input );
vlc_gc_decref( p_input );
while( i_options-- )
free( psz_line );
}
+ input_item_node_PostAndDelete( p_subitems );
+
vlc_gc_decref(p_current_input);
return 0; /* Needed for correct operation of go back */
}
while( psz_parse )
{
const char *psz_option = NULL;
- char *psz_end = strchr( psz_parse, ':' );
- if( psz_end ) { *psz_end = 0; psz_end++; }
+ char *psz_option_end = strchr( psz_parse, ':' );
+ if( psz_option_end ) { *psz_option_end = 0; psz_option_end++; }
if( i_count == 0 )
{
psz_dup );
}
- psz_parse = psz_end;
+ psz_parse = psz_option_end;
i_count++;
}