]> git.sesse.net Git - vlc/commitdiff
vod: use memcmp()
authorPierre Ynard <linkfanel@yahoo.fr>
Mon, 14 Jun 2010 21:10:57 +0000 (23:10 +0200)
committerPierre Ynard <linkfanel@yahoo.fr>
Mon, 14 Jun 2010 21:10:57 +0000 (23:10 +0200)
Port df301d6589de2662febe4cf408e4ecdcf3b589b9 to duplicated code

modules/misc/rtsp.c

index b03df5b5032a4e897066a20107e3984212d4acf0..91e6a2b4b461bc41efe7e92cd39761b64626b55f 100644 (file)
@@ -581,7 +581,7 @@ static int MediaAddES( vod_t *p_vod, vod_media_t *p_media, 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;