diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2006-05-15 17:11:50 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2006-05-15 17:11:50 +0000 |
commit | 2c95f59f0681acad628b83ab2e95beb073162510 (patch) | |
tree | 93241fda292d45f2e4765cb87a83e21b78bb8583 | |
parent | a959f0ea7a2c27e38f26bdb526d7b4c49cc37f86 (diff) | |
download | ffmpeg-2c95f59f0681acad628b83ab2e95beb073162510.tar.gz |
fix avc nal parsing
Originally committed as revision 5382 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/movenc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 1d9f80d320..85978811de 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -452,15 +452,15 @@ static uint8_t *avc_find_startcode( uint8_t *p, uint8_t *end ) if( (x - 0x01010101) & (~x) & 0x80808080 ) { // generic if( p[1] == 0 ) { if( p[0] == 0 && p[2] == 1 ) - return p; + return p-1; if( p[2] == 0 && p[3] == 1 ) - return p+1; + return p; } if( p[3] == 0 ) { if( p[2] == 0 && p[4] == 1 ) - return p+2; + return p+1; if( p[4] == 0 && p[5] == 1 ) - return p+3; + return p+2; } } } |