Commit 68dbf6ec authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

block_BytestreamInit(): rationalize prototype

parent e80f251e
......@@ -37,15 +37,10 @@ typedef struct block_bytestream_t
/*****************************************************************************
* block_bytestream_t management
*****************************************************************************/
VLC_USED
static inline block_bytestream_t block_BytestreamInit( void )
static inline void block_BytestreamInit( block_bytestream_t *p_bytestream )
{
block_bytestream_t bytestream;
bytestream.i_offset = 0;
bytestream.p_chain = bytestream.p_block = NULL;
return bytestream;
p_bytestream->p_chain = p_bytestream->p_block = NULL;
p_bytestream->i_offset = 0;
}
static inline void block_BytestreamRelease( block_bytestream_t *p_bytestream )
......@@ -65,8 +60,7 @@ static inline void block_BytestreamRelease( block_bytestream_t *p_bytestream )
static inline void block_BytestreamEmpty( block_bytestream_t *p_bytestream )
{
block_BytestreamRelease( p_bytestream );
*p_bytestream = block_BytestreamInit();
block_BytestreamInit( p_bytestream );
}
/**
......
......@@ -140,7 +140,7 @@ static int OpenCommon( vlc_object_t *p_this, bool b_packetizer )
date_Set( &p_sys->end_date, 0 );
p_sys->i_pts = VLC_TS_INVALID;
p_sys->bytestream = block_BytestreamInit();
block_BytestreamInit( &p_sys->bytestream );
/* Set output properties */
p_dec->fmt_out.i_cat = AUDIO_ES;
......
......@@ -157,7 +157,7 @@ static int OpenCommon( vlc_object_t *p_this, bool b_packetizer )
p_sys->b_dts_hd = false;
p_sys->i_pts = VLC_TS_INVALID;
p_sys->bytestream = block_BytestreamInit();
block_BytestreamInit( &p_sys->bytestream );
/* Set output properties */
p_dec->fmt_out.i_cat = AUDIO_ES;
......
......@@ -150,7 +150,7 @@ static int Open( vlc_object_t *p_this )
p_sys->b_packetizer = false;
p_sys->i_state = STATE_NOSYNC;
date_Set( &p_sys->end_date, 0 );
p_sys->bytestream = block_BytestreamInit();
block_BytestreamInit( &p_sys->bytestream );
p_sys->i_pts = VLC_TS_INVALID;
p_sys->b_discontinuity = false;
......
......@@ -1365,7 +1365,7 @@ static int Open( vlc_object_t *p_this )
p_sys->i_dts_last_out = p_sys->i_pts_last_out = VLC_TS_INVALID;
p_sys->i_state = NOT_SYNCED;
p_sys->bytestream = block_BytestreamInit();
block_BytestreamInit( &p_sys->bytestream );
p_sys->pp_outqueue_last = &p_sys->p_outqueue;
p_sys->pp_eu_last = &p_sys->p_eu;
......
......@@ -127,7 +127,7 @@ static int Open( vlc_object_t *p_this )
p_sys->i_state = STATE_NOSYNC;
p_sys->b_stream_info = false;
p_sys->i_pts = VLC_TS_INVALID;
p_sys->bytestream = block_BytestreamInit();
block_BytestreamInit( &p_sys->bytestream );
/* */
es_format_Copy( &p_dec->fmt_out, &p_dec->fmt_in );
......
......@@ -133,7 +133,7 @@ static int Open( vlc_object_t *p_this )
p_sys->i_state = STATE_NOSYNC;
date_Set( &p_sys->end_date, 0 );
p_sys->bytestream = block_BytestreamInit();
block_BytestreamInit( &p_sys->bytestream );
p_sys->b_mlp = false;
/* Set output properties */
......
......@@ -206,7 +206,7 @@ static int OpenPacketizer( vlc_object_t *p_this )
/* Misc init */
p_sys->i_state = STATE_NOSYNC;
date_Set( &p_sys->end_date, 0 );
p_sys->bytestream = block_BytestreamInit();
block_BytestreamInit( &p_sys->bytestream );
p_sys->b_latm_cfg = false;
/* Set output properties */
......
......@@ -68,7 +68,7 @@ static inline void packetizer_Init( packetizer_t *p_pack,
void *p_private )
{
p_pack->i_state = STATE_NOSYNC;
p_pack->bytestream = block_BytestreamInit();
block_BytestreamInit( &p_pack->bytestream );
p_pack->i_offset = 0;
p_pack->b_flushing = false;
......
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