Commit 0e9f2588 authored by Ilkka Ollakka's avatar Ilkka Ollakka

mpegvideo: add few likely/unlikely

parent c0f79934
...@@ -318,8 +318,8 @@ static int PacketizeValidate( void *p_private, block_t *p_au ) ...@@ -318,8 +318,8 @@ static int PacketizeValidate( void *p_private, block_t *p_au )
/* If a discontinuity has been encountered, then wait till /* If a discontinuity has been encountered, then wait till
* the next Intra frame before continuing with packetizing */ * the next Intra frame before continuing with packetizing */
if( p_sys->b_discontinuity && if( unlikely( p_sys->b_discontinuity &&
p_sys->b_sync_on_intra_frame ) p_sys->b_sync_on_intra_frame ) )
{ {
if( (p_au->i_flags & BLOCK_FLAG_TYPE_I) == 0 ) if( (p_au->i_flags & BLOCK_FLAG_TYPE_I) == 0 )
{ {
...@@ -333,8 +333,8 @@ static int PacketizeValidate( void *p_private, block_t *p_au ) ...@@ -333,8 +333,8 @@ static int PacketizeValidate( void *p_private, block_t *p_au )
/* We've just started the stream, wait for the first PTS. /* We've just started the stream, wait for the first PTS.
* We discard here so we can still get the sequence header. */ * We discard here so we can still get the sequence header. */
if( p_sys->i_dts <= VLC_TS_INVALID && p_sys->i_pts <= VLC_TS_INVALID && if( unlikely( p_sys->i_dts <= VLC_TS_INVALID && p_sys->i_pts <= VLC_TS_INVALID &&
p_sys->i_interpolated_dts <= VLC_TS_INVALID ) p_sys->i_interpolated_dts <= VLC_TS_INVALID ))
{ {
msg_Dbg( p_dec, "need a starting pts/dts" ); msg_Dbg( p_dec, "need a starting pts/dts" );
return VLC_EGENERIC; return VLC_EGENERIC;
...@@ -342,7 +342,7 @@ static int PacketizeValidate( void *p_private, block_t *p_au ) ...@@ -342,7 +342,7 @@ static int PacketizeValidate( void *p_private, block_t *p_au )
/* When starting the stream we can have the first frame with /* When starting the stream we can have the first frame with
* an invalid DTS (i_interpolated_pts is initialized to VLC_TS_INVALID) */ * an invalid DTS (i_interpolated_pts is initialized to VLC_TS_INVALID) */
if( p_au->i_dts <= VLC_TS_INVALID ) if( unlikely( p_au->i_dts <= VLC_TS_INVALID ) )
p_au->i_dts = p_au->i_pts; p_au->i_dts = p_au->i_pts;
return VLC_SUCCESS; return VLC_SUCCESS;
......
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