diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-04-22 13:55:12 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-04-22 13:55:12 +0000 |
commit | 80097bbf712ca2f577b375d6ba94e3957b2c2e78 (patch) | |
tree | 695ff03181a9d4f90c410b4936e3ff2ef26c7bcf /libavcodec/h263dec.c | |
parent | 5cd62665f0b3e6a1326327637d6db16fe319acec (diff) | |
download | ffmpeg-80097bbf712ca2f577b375d6ba94e3957b2c2e78.tar.gz |
cleanup mpeg1/2 bitstream parser
Originally committed as revision 1813 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h263dec.c')
-rw-r--r-- | libavcodec/h263dec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 98215bf4cd..cc3bff1375 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -325,14 +325,16 @@ static int mpeg4_find_frame_end(MpegEncContext *s, uint8_t *buf, int buf_size){ } } } - - for(; i<buf_size; i++){ + + if(vop_found){ + for(; i<buf_size; i++){ state= (state<<8) | buf[i]; if((state&0xFFFFFF00) == 0x100){ pc->frame_start_found=0; pc->state=-1; return i-3; } + } } pc->frame_start_found= vop_found; pc->state= state; |