]> git.sesse.net Git - vlc/commitdiff
Use memcmp()
authorRémi Denis-Courmont <rem@videolan.org>
Tue, 21 Aug 2007 16:45:36 +0000 (16:45 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Tue, 21 Aug 2007 16:45:36 +0000 (16:45 +0000)
modules/stream_out/rtp.c

index aded604c5484bfd360ae5806e170950044764b13..3089cdd1c9066dac3f5029bf85b84fa87a2bb96e 100644 (file)
@@ -1092,12 +1092,12 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
                     i_size = i_buffer;
                     for( i_offset = 4; i_offset+3 < i_buffer ; i_offset++)
                     {
-                        if( p_buffer[i_offset] == 0 && p_buffer[i_offset+1] == 0 && p_buffer[i_offset+2] == 0 && p_buffer[i_offset+3] == 1 )
+                        if( !memcmp (p_buffer + i_offset, "\x00\x00\x00\x01", 4 ) )
                         {
                             /* we found another startcode */
                             i_size = i_offset;
                             break;
-                        } 
+                        }
                     }
                     if( i_nal_type == 7 )
                     {