Commit 7cdaa920 authored by michael's avatar michael

slightly more correct spliting of frames


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@9076 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent dc9ec5cb
...@@ -38,7 +38,7 @@ static int h261_find_frame_end(ParseContext *pc, AVCodecContext* avctx, const ui ...@@ -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++){ for(i=0; i<buf_size && !vop_found; i++){
state= (state<<8) | buf[i]; state= (state<<8) | buf[i];
for(j=0; j<8; j++){ for(j=0; j<8; j++){
if(((state>>j)&0xFFFFF) == 0x00010){ if(((state>>j)&0xFFFFF0) == 0x000100){
vop_found=1; vop_found=1;
break; break;
} }
...@@ -48,10 +48,10 @@ static int h261_find_frame_end(ParseContext *pc, AVCodecContext* avctx, const ui ...@@ -48,10 +48,10 @@ static int h261_find_frame_end(ParseContext *pc, AVCodecContext* avctx, const ui
for(; i<buf_size; i++){ for(; i<buf_size; i++){
state= (state<<8) | buf[i]; state= (state<<8) | buf[i];
for(j=0; j<8; j++){ for(j=0; j<8; j++){
if(((state>>j)&0xFFFFF) == 0x00010){ if(((state>>j)&0xFFFFF0) == 0x000100){
pc->frame_start_found=0; pc->frame_start_found=0;
pc->state= state>>(2*8); pc->state= (state>>(3*8))+0xFF00;
return i-1; return i-2;
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment