Commit 4655ce5d authored by Romain Vimont's avatar Romain Vimont Committed by Jean-Baptiste Kempf

core: replace es_out_sys_t* by void*

See #17078
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent c7f9e3ce
......@@ -116,7 +116,7 @@ struct es_out_t
int (*pf_control)( es_out_t *, int i_query, va_list );
void (*pf_destroy)( es_out_t * );
es_out_sys_t *p_sys;
void *p_sys;
};
VLC_USED
......
......@@ -1001,7 +1001,8 @@ static int blurayEsPid(demux_sys_t *p_sys, int es_type, int i_es_idx)
static es_out_id_t *esOutAdd(es_out_t *p_out, const es_format_t *p_fmt)
{
demux_t *p_demux = p_out->p_sys->p_demux;
es_out_sys_t *es_out_sys = p_out->p_sys;
demux_t *p_demux = es_out_sys->p_demux;
demux_sys_t *p_sys = p_demux->p_sys;
es_format_t fmt;
bool b_select = false;
......@@ -1061,14 +1062,16 @@ static es_out_id_t *esOutAdd(es_out_t *p_out, const es_format_t *p_fmt)
static int esOutSend(es_out_t *p_out, es_out_id_t *p_es, block_t *p_block)
{
demux_t *p_demux = p_out->p_sys->p_demux;
es_out_sys_t *es_out_sys = p_out->p_sys;
demux_t *p_demux = es_out_sys->p_demux;
return es_out_Send(p_demux->out, p_es, p_block);
}
static void esOutDel(es_out_t *p_out, es_out_id_t *p_es)
{
demux_t *p_demux = p_out->p_sys->p_demux;
es_out_sys_t *es_out_sys = p_out->p_sys;
demux_t *p_demux = es_out_sys->p_demux;
demux_sys_t *p_sys = p_demux->p_sys;
int idx = findEsPairIndexByEs(p_sys, p_es);
......@@ -1081,14 +1084,16 @@ static void esOutDel(es_out_t *p_out, es_out_id_t *p_es)
static int esOutControl(es_out_t *p_out, int i_query, va_list args)
{
demux_t *p_demux = p_out->p_sys->p_demux;
es_out_sys_t *es_out_sys = p_out->p_sys;
demux_t *p_demux = es_out_sys->p_demux;
return es_out_vaControl(p_demux->out, i_query, args);
}
static void esOutDestroy(es_out_t *p_out)
{
demux_t *p_demux = p_out->p_sys->p_demux;
es_out_sys_t *es_out_sys = p_out->p_sys;
demux_t *p_demux = es_out_sys->p_demux;
demux_sys_t *p_sys = p_demux->p_sys;
for (size_t i = 0; i < vlc_array_count(&p_sys->es); ++i)
......@@ -1114,12 +1119,13 @@ static es_out_t *esOutNew(demux_t *p_demux)
p_out->pf_destroy = esOutDestroy;
p_out->pf_send = esOutSend;
p_out->p_sys = malloc(sizeof(*p_out->p_sys));
if (unlikely(p_out->p_sys == NULL)) {
es_out_sys_t *es_out_sys = malloc(sizeof(*es_out_sys));
if (unlikely(es_out_sys == NULL)) {
free(p_out);
return NULL;
}
p_out->p_sys->p_demux = p_demux;
p_out->p_sys = es_out_sys;
es_out_sys->p_demux = p_demux;
return p_out;
}
......
......@@ -422,10 +422,11 @@ static es_out_id_t *EsOutGetFromID( es_out_t *out, int i_id )
return es_cat - i_id;
}
for( int i = 0; i < out->p_sys->i_es; i++ )
es_out_sys_t *p_sys = out->p_sys;
for( int i = 0; i < p_sys->i_es; i++ )
{
if( out->p_sys->es[i]->i_id == i_id )
return out->p_sys->es[i];
if( p_sys->es[i]->i_id == i_id )
return p_sys->es[i];
}
return NULL;
}
......@@ -826,7 +827,7 @@ static void EsOutFrameNext( es_out_t *out )
mtime_t i_duration;
input_DecoderFrameNext( p_es_video->p_dec, &i_duration );
msg_Dbg( out->p_sys->p_input, "EsOutFrameNext consummed %d ms", (int)(i_duration/1000) );
msg_Dbg( p_sys->p_input, "EsOutFrameNext consummed %d ms", (int)(i_duration/1000) );
if( i_duration <= 0 )
i_duration = 40*1000;
......@@ -992,7 +993,8 @@ static void EsOutESVarUpdate( es_out_t *out, es_out_id_t *es,
static bool EsOutIsProgramVisible( es_out_t *out, int i_group )
{
return out->p_sys->i_group_id == 0 || out->p_sys->i_group_id == i_group;
es_out_sys_t *p_sys = out->p_sys;
return p_sys->i_group_id == 0 || p_sys->i_group_id == i_group;
}
/* EsOutProgramSelect:
......@@ -3370,7 +3372,8 @@ static void EsDeleteInfo( es_out_t *out, es_out_id_t *es )
if( likely( psz_info_category = EsInfoCategoryName( es ) ) )
{
input_Control( out->p_sys->p_input, INPUT_DEL_INFO,
es_out_sys_t *p_sys = out->p_sys;
input_Control( p_sys->p_input, INPUT_DEL_INFO,
psz_info_category, NULL );
free( psz_info_category );
......
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