]> git.sesse.net Git - vlc/commitdiff
record: add few likely/unlikely macros
authorIlkka Ollakka <ileoo@videolan.org>
Fri, 7 Mar 2014 14:59:06 +0000 (16:59 +0200)
committerIlkka Ollakka <ileoo@videolan.org>
Tue, 15 Jul 2014 13:07:18 +0000 (16:07 +0300)
modules/stream_out/record.c

index 8231f487fb2e52ae056c1ee5f1dce752a95d28bd..926e5a92c6701f3da6cfce8d2a511ab28342ad2f 100644 (file)
@@ -559,7 +559,7 @@ static void OutputSend( sout_stream_t *p_stream, sout_stream_id_sys_t *id, block
     {
         /* We wait until the first key frame (if needed) and
          * to be beyong i_dts_start (for stream without key frame) */
-        if( id->b_wait_key )
+        if( unlikely( id->b_wait_key ) )
         {
             if( p_block->i_flags & BLOCK_FLAG_TYPE_I )
             {
@@ -570,12 +570,12 @@ static void OutputSend( sout_stream_t *p_stream, sout_stream_id_sys_t *id, block
             if( ( p_block->i_flags & BLOCK_FLAG_TYPE_MASK ) == 0 )
                 id->b_wait_key = false;
         }
-        if( id->b_wait_start )
+        if( unlikely( id->b_wait_start ) )
         {
             if( p_block->i_dts >=p_sys->i_dts_start )
                 id->b_wait_start = false;
         }
-        if( id->b_wait_key || id->b_wait_start )
+        if( unlikely( id->b_wait_key || id->b_wait_start ) )
             block_ChainRelease( p_block );
         else
             sout_StreamIdSend( p_sys->p_out, id->id, p_block );