[vlc-commits] mpegvideo: add few likely/unlikely
Ilkka Ollakka
git at videolan.org
Tue Jul 15 15:09:30 CEST 2014
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sat Mar 15 17:15:41 2014 +0200| [0e9f25889806de3e3a289c8e437f1de8c0f1feeb] | committer: Ilkka Ollakka
mpegvideo: add few likely/unlikely
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0e9f25889806de3e3a289c8e437f1de8c0f1feeb
---
modules/packetizer/mpegvideo.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/packetizer/mpegvideo.c b/modules/packetizer/mpegvideo.c
index 038366c..2d21fa7 100644
--- a/modules/packetizer/mpegvideo.c
+++ b/modules/packetizer/mpegvideo.c
@@ -318,8 +318,8 @@ static int PacketizeValidate( void *p_private, block_t *p_au )
/* If a discontinuity has been encountered, then wait till
* the next Intra frame before continuing with packetizing */
- if( p_sys->b_discontinuity &&
- p_sys->b_sync_on_intra_frame )
+ if( unlikely( p_sys->b_discontinuity &&
+ p_sys->b_sync_on_intra_frame ) )
{
if( (p_au->i_flags & BLOCK_FLAG_TYPE_I) == 0 )
{
@@ -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 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 &&
- p_sys->i_interpolated_dts <= 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 ))
{
msg_Dbg( p_dec, "need a starting pts/dts" );
return VLC_EGENERIC;
@@ -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
* 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;
return VLC_SUCCESS;
More information about the vlc-commits
mailing list