vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Wed Aug 3 18:24:38 2011 +0300| [68dbf6ecee4df89e956ff45bcf8826f58a5b41e2] | committer: Rémi Denis-Courmont
block_BytestreamInit(): rationalize prototype > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=68dbf6ecee4df89e956ff45bcf8826f58a5b41e2 --- include/vlc_block_helper.h | 14 ++++---------- modules/codec/a52.c | 2 +- modules/codec/dts.c | 2 +- modules/codec/mpeg_audio.c | 2 +- modules/packetizer/dirac.c | 2 +- modules/packetizer/flac.c | 2 +- modules/packetizer/mlp.c | 2 +- modules/packetizer/mpeg4audio.c | 2 +- modules/packetizer/packetizer_helper.h | 2 +- 9 files changed, 12 insertions(+), 18 deletions(-) diff --git a/include/vlc_block_helper.h b/include/vlc_block_helper.h index 1528b94..6852509 100644 --- a/include/vlc_block_helper.h +++ b/include/vlc_block_helper.h @@ -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 ); } /** diff --git a/modules/codec/a52.c b/modules/codec/a52.c index da59b16..d2768a4 100644 --- a/modules/codec/a52.c +++ b/modules/codec/a52.c @@ -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; diff --git a/modules/codec/dts.c b/modules/codec/dts.c index 57899c3..812c49f 100644 --- a/modules/codec/dts.c +++ b/modules/codec/dts.c @@ -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; diff --git a/modules/codec/mpeg_audio.c b/modules/codec/mpeg_audio.c index 2335c4e..4fef2ed 100644 --- a/modules/codec/mpeg_audio.c +++ b/modules/codec/mpeg_audio.c @@ -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; diff --git a/modules/packetizer/dirac.c b/modules/packetizer/dirac.c index fb7fb15..c56aae7 100644 --- a/modules/packetizer/dirac.c +++ b/modules/packetizer/dirac.c @@ -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; diff --git a/modules/packetizer/flac.c b/modules/packetizer/flac.c index d45fb5a..5d6ad75 100644 --- a/modules/packetizer/flac.c +++ b/modules/packetizer/flac.c @@ -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 ); diff --git a/modules/packetizer/mlp.c b/modules/packetizer/mlp.c index d466e77..1b9dc8b 100644 --- a/modules/packetizer/mlp.c +++ b/modules/packetizer/mlp.c @@ -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 */ diff --git a/modules/packetizer/mpeg4audio.c b/modules/packetizer/mpeg4audio.c index 3e4561c..b0de740 100644 --- a/modules/packetizer/mpeg4audio.c +++ b/modules/packetizer/mpeg4audio.c @@ -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 */ diff --git a/modules/packetizer/packetizer_helper.h b/modules/packetizer/packetizer_helper.h index b46b465..bb6f3ed 100644 --- a/modules/packetizer/packetizer_helper.h +++ b/modules/packetizer/packetizer_helper.h @@ -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; _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
