p_avcC = p_box->data.p_avcC;
p_avcC->i_avcC = i_read;
- p_avcC->p_avcC = malloc( p_avcC->i_avcC );
- memcpy( p_avcC->p_avcC, p_peek, i_read );
+ if( p_avcC->i_avcC > 0 )
+ {
+ p_avcC->p_avcC = malloc( p_avcC->i_avcC );
+ memcpy( p_avcC->p_avcC, p_peek, i_read );
+ }
MP4_GET1BYTE( p_avcC->i_version );
MP4_GET1BYTE( p_avcC->i_profile );
MP4_Box_data_avcC_t *p_avcC = p_box->data.p_avcC;
int i;
+ if( p_avcC->i_avcC > 0 ) FREENULL( p_avcC->p_avcC );
+
for( i = 0; i < p_avcC->i_sps; i++ )
{
FREENULL( p_avcC->sps[i] );
FREENULL( p_avcC->pps[i] );
}
if( p_avcC->i_sps > 0 ) FREENULL( p_avcC->sps );
+ if( p_avcC->i_sps > 0 ) FREENULL( p_avcC->i_sps_length );
if( p_avcC->i_pps > 0 ) FREENULL( p_avcC->pps );
+ if( p_avcC->i_pps > 0 ) FREENULL( p_avcC->i_pps_length );
}
static int MP4_ReadBox_sample_soun( stream_t *p_stream, MP4_Box_t *p_box )
set_description( _("XSPF playlist import") );
add_shortcut( "xspf-open" );
set_capability( "demux2", 10 );
- set_callbacks( E_(xspf_import_Activate), NULL );
+ set_callbacks( E_(Import_xspf),E_(Close_xspf) );
add_submodule();
set_description( _("New winamp 5.2 shoutcast import") );
add_shortcut( "shout-winamp" );
int E_(Import_podcast) ( vlc_object_t * );
void E_(Close_podcast) ( vlc_object_t * );
-int E_(xspf_import_Activate) ( vlc_object_t * );
+int E_(Import_xspf) ( vlc_object_t * );
+void E_(Close_xspf) ( vlc_object_t * );
int E_(Import_Shoutcast) ( vlc_object_t * );
void E_(Close_Shoutcast) ( vlc_object_t * );
/**
* \brief XSPF submodule initialization function
*/
-int E_(xspf_import_Activate)( vlc_object_t *p_this )
+int E_(Import_xspf)( vlc_object_t *p_this )
{
DEMUX_BY_EXTENSION_OR_FORCED_MSG( ".xspf", "xspf-open",
"using XSPF playlist reader" );
return VLC_SUCCESS;
}
+void E_(Close_xspf)( vlc_object_t *p_this )
+{
+ demux_t *p_demux = (demux_t *)p_this;
+ free( p_demux->p_sys );
+}
+
/**
* \brief demuxer function for XSPF parsing
*/
xml_reader_t *p_reader;
xml_reader_sys_t *p_sys;
xmlTextReaderPtr p_libxml_reader;
- xmlParserInputBufferPtr p_read_context;
-
- p_read_context = malloc( sizeof( xmlParserInputBuffer ) );
p_libxml_reader = xmlReaderForIO( StreamRead, NULL, p_stream,
NULL, NULL, 0 );
const xmlChar *psz_name =
xmlTextReaderConstName( p_reader->p_sys->p_reader );
- if( psz_name ) return strdup( psz_name );
+ if( psz_name ) return strdup( (const char *)psz_name );
else return 0;
}
const xmlChar *psz_value =
xmlTextReaderConstValue( p_reader->p_sys->p_reader );
- if( psz_value ) return strdup( psz_value );
+ if( psz_value ) return strdup( (const char *)psz_value );
else return 0;
}
{
psz_path = psz_mrl;
msg_Dbg( p_input, "trying to pre-parse %s", psz_path );
- psz_demux = strdup( "" );
- psz_access = strdup( "file" );
+ psz_demux = "";
+ psz_access = "file";
}
if( in->p_demux )
*/
int spu_Init( spu_t *p_spu )
{
- char *psz_filter;
char *psz_parser;
vlc_value_t val;
var_Create( p_spu, "sub-filter", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
var_Get( p_spu, "sub-filter", &val );
- psz_filter = val.psz_string;
- psz_parser = psz_filter;
+ psz_parser = val.psz_string;
while( psz_parser && *psz_parser )
{
free( psz_name );
}
+ if( val.psz_string ) free( val.psz_string );
return VLC_EGENERIC;
}