Fix vc1 split().

Fixes Subtitle-sample.evo, issue52.

Originally committed as revision 17533 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Michael Niedermayer 16 years ago
parent 91ba181a15
commit 7bbc686f82
  1. 10
      libavcodec/vc1_parser.c

@ -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;
}

Loading…
Cancel
Save