# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
#include <stdio.h>
#include "input_internal.h"
-#include "vlc_playlist.h"
-#include "iso_lang.h"
+#include <vlc_iso_lang.h>
/* FIXME we should find a better way than including that */
#include "../text/iso-639_def.h"
vlc_value_t val;
int i;
+ if( !out ) return NULL;
+ if( !p_sys )
+ {
+ free( out );
+ return NULL;
+ }
+
out->pf_add = EsOutAdd;
out->pf_send = EsOutSend;
out->pf_del = EsOutDel;
out->pf_control = EsOutControl;
out->p_sys = p_sys;
- out->b_sout = (p_input->p->p_sout != NULL ? true : false);
+ out->b_sout = p_input->p->p_sout != NULL;
p_sys->p_input = p_input;
vlc_value_t val;
es_out_pgrm_t *p_pgrm = malloc( sizeof( es_out_pgrm_t ) );
+ if( !p_pgrm ) return NULL;
/* Init */
p_pgrm->i_id = i_group;
es_out_pgrm_t *p_pgrm = NULL;
int i;
+ if( !es ) return NULL;
+
if( fmt->i_group < 0 )
{
msg_Err( p_input, "invalid group number" );
+ free( es );
return NULL;
}
{
if( es->fmt.i_cat == VIDEO_ES || es->fmt.i_cat == SPU_ES )
{
- if( !var_GetBool( p_input, "video" ) ||
- ( p_input->p->p_sout && !var_GetBool( p_input, "sout-video" ) ) )
+ if( !var_GetBool( p_input, out->b_sout ? "sout-video" : "video" ) )
{
msg_Dbg( p_input, "video is disabled, not selecting ES 0x%x",
es->i_id );
else if( es->fmt.i_cat == AUDIO_ES )
{
var_Get( p_input, "audio", &val );
- if( !var_GetBool( p_input, "audio" ) ||
- ( p_input->p->p_sout && !var_GetBool( p_input, "sout-audio" ) ) )
+ if( !var_GetBool( p_input, out->b_sout ? "sout-audio" : "audio" ) )
{
msg_Dbg( p_input, "audio is disabled, not selecting ES 0x%x",
es->i_id );
if( es->fmt.i_cat == SPU_ES )
{
var_Get( p_input, "spu", &val );
- if( !var_GetBool( p_input, "spu" ) ||
- ( p_input->p->p_sout && !var_GetBool( p_input, "sout-spu" ) ) )
+ if( !var_GetBool( p_input, out->b_sout ? "sout-spu" : "spu" ) )
{
msg_Dbg( p_input, "spu is disabled, not selecting ES 0x%x",
es->i_id );
VLC_FOURCC('c', 'c', '3', ' '),
VLC_FOURCC('c', 'c', '4', ' '),
};
- static const char *ppsz_description[4] = {
+ static const char ppsz_description[4][18] = {
N_("Closed captions 1"),
N_("Closed captions 2"),
N_("Closed captions 3"),
}
}
{
- /* FIXME: we don't want to depend on the playlist */
- playlist_t * p_playlist = vlc_object_find( p_sys->p_input,
- VLC_OBJECT_PLAYLIST, FIND_PARENT );
- if( p_playlist )
- {
- PL_LOCK;
- p_playlist->gc_date = mdate();
- vlc_object_signal_unlocked( p_playlist );
- PL_UNLOCK;
- vlc_object_release( p_playlist );
- }
+ vlc_event_t event;
+ event.type = vlc_InputSelectedStreamChanged;
+ vlc_event_send( &p_sys->p_input->p->event_manager, &event );
}
return VLC_SUCCESS;