[vlc-commits] commit: vod: use memcmp() (Pierre Ynard )

git at videolan.org git at videolan.org
Mon Jun 14 23:11:45 CEST 2010


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Mon Jun 14 23:10:57 2010 +0200| [7820c6b276438390eac5b5a371659dc7cbafabfa] | committer: Pierre Ynard 

vod: use memcmp()

Port df301d6589de2662febe4cf408e4ecdcf3b589b9 to duplicated code

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7820c6b276438390eac5b5a371659dc7cbafabfa
---

 modules/misc/rtsp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/misc/rtsp.c b/modules/misc/rtsp.c
index b03df5b..91e6a2b 100644
--- a/modules/misc/rtsp.c
+++ b/modules/misc/rtsp.c
@@ -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;



More information about the vlc-commits mailing list