Mercurial > libavformat.hg
comparison avc.c @ 4792:dd9383951cb9 libavformat
Use intptr_t when casting pointers to int.
author | ramiro |
---|---|
date | Thu, 26 Mar 2009 01:34:02 +0000 |
parents | 765fe37ec45b |
children | 6ea4f08de89a |
comparison
equal
deleted
inserted
replaced
4791:3ee8699e4f35 | 4792:dd9383951cb9 |
---|---|
23 #include "avformat.h" | 23 #include "avformat.h" |
24 #include "avio.h" | 24 #include "avio.h" |
25 | 25 |
26 const uint8_t *ff_avc_find_startcode(const uint8_t *p, const uint8_t *end) | 26 const uint8_t *ff_avc_find_startcode(const uint8_t *p, const uint8_t *end) |
27 { | 27 { |
28 const uint8_t *a = p + 4 - ((long)p & 3); | 28 const uint8_t *a = p + 4 - ((intptr_t)p & 3); |
29 | 29 |
30 for( end -= 3; p < a && p < end; p++ ) { | 30 for( end -= 3; p < a && p < end; p++ ) { |
31 if( p[0] == 0 && p[1] == 0 && p[2] == 1 ) | 31 if( p[0] == 0 && p[1] == 0 && p[2] == 1 ) |
32 return p; | 32 return p; |
33 } | 33 } |