diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-05-20 01:05:34 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-05-20 01:05:34 +0000 |
commit | cb590b4842bdb7145b4880b0671f98c60175900c (patch) | |
tree | 777e3d4aba8b034c6838eb0f956096417f6c2ddc /libavcodec/h261_parser.c | |
parent | d205abe9f77bc6f90b932c1bd7f03ffea2f6007e (diff) | |
download | ffmpeg-cb590b4842bdb7145b4880b0671f98c60175900c.tar.gz |
slightly more correct spliting of frames
Originally committed as revision 9076 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h261_parser.c')
-rw-r--r-- | libavcodec/h261_parser.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/h261_parser.c b/libavcodec/h261_parser.c index 3671cdbf72..3f3aac6e47 100644 --- a/libavcodec/h261_parser.c +++ b/libavcodec/h261_parser.c @@ -38,7 +38,7 @@ static int h261_find_frame_end(ParseContext *pc, AVCodecContext* avctx, const ui for(i=0; i<buf_size && !vop_found; i++){ state= (state<<8) | buf[i]; for(j=0; j<8; j++){ - if(((state>>j)&0xFFFFF) == 0x00010){ + if(((state>>j)&0xFFFFF0) == 0x000100){ vop_found=1; break; } @@ -48,10 +48,10 @@ static int h261_find_frame_end(ParseContext *pc, AVCodecContext* avctx, const ui for(; i<buf_size; i++){ state= (state<<8) | buf[i]; for(j=0; j<8; j++){ - if(((state>>j)&0xFFFFF) == 0x00010){ + if(((state>>j)&0xFFFFF0) == 0x000100){ pc->frame_start_found=0; - pc->state= state>>(2*8); - return i-1; + pc->state= (state>>(3*8))+0xFF00; + return i-2; } } } |