Fix vc1 split().

Fixes Subtitle-sample.evo, issue52.

Originally committed as revision 17533 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2009-02-22 20:48:12 +00:00
parent 91ba181a15
commit 7bbc686f82
1 changed files with 8 additions and 2 deletions

View File

@ -99,11 +99,17 @@ static int vc1_split(AVCodecContext *avctx,
{
int i;
uint32_t state= -1;
int charged=0;
for(i=0; i<buf_size; i++){
state= (state<<8) | buf[i];
if(IS_MARKER(state) && state != VC1_CODE_SEQHDR && state != VC1_CODE_ENTRYPOINT)
return i-3;
if(IS_MARKER(state)){
if(state == VC1_CODE_SEQHDR || state == VC1_CODE_ENTRYPOINT){
charged=1;
}else if(charged){
return i-3;
}
}
}
return 0;
}