# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
#include <assert.h>
#include <vlc_playlist.h>
static void CloseDemux ( vlc_object_t * );
vlc_module_begin();
- set_shortname( _("SAP"));
- set_description( _("SAP Announcements") );
+ set_shortname( N_("SAP"));
+ set_description( N_("SAP Announcements") );
set_category( CAT_PLAYLIST );
set_subcategory( SUBCAT_PLAYLIST_SD );
set_callbacks( Open, Close );
add_submodule();
- set_description( _("SDP Descriptions parser") );
+ set_description( N_("SDP Descriptions parser") );
add_shortcut( "sdp" );
set_capability( "demux", 51 );
set_callbacks( OpenDemux, CloseDemux );
p_sdp->psz_uri = NULL;
}
- if( p_sdp->psz_uri == NULL ) return VLC_EGENERIC;
+ if( p_sdp->psz_uri == NULL )
+ {
+ FreeSDP( p_sdp );
+ return VLC_EGENERIC;
+ }
for( i = 0 ; i< p_sd->p_sys->i_announces ; i++ )
{
psz_value = GetAttribute( p_sap->p_sdp->pp_attributes, p_sap->p_sdp->i_attributes, "tool" );
if( psz_value != NULL )
{
- input_ItemAddInfo( p_input, _("Session"), _("Tool"), "%s",
- psz_value );
+ input_ItemAddInfo( p_input, _("Session"), _("Tool"), "%s", psz_value );
}
if( strcmp( p_sdp->username, "-" ) )
{
goto error;
}
- if ((sscanf (data, "%63s "I64Fu" "I64Fu" IN IP%u %1023s",
+ if ((sscanf (data, "%63s %"PRIu64" %"PRIu64" IN IP%u %1023s",
p_sdp->username, &p_sdp->session_id,
&p_sdp->session_version, &p_sdp->orig_ip_version,
p_sdp->orig_host) != 5)
}
if( p_announce->i_input_id > -1 )
- playlist_DeleteFromInput( pl_Get(p_sd), p_announce->i_input_id, false );
+ {
+ playlist_DeleteFromInput( pl_Yield( p_sd ),
+ p_announce->i_input_id, false );
+ pl_Release( p_sd );
+ }
for( i = 0; i< p_sd->p_sys->i_announces; i++)
{