Browse Source

Fix vc1 split().

Fixes Subtitle-sample.evo, issue52.

Originally committed as revision 17533 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer 17 years ago
parent
commit
7bbc686f82
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      libavcodec/vc1_parser.c

+ 8
- 2
libavcodec/vc1_parser.c 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;
}


Loading…
Cancel
Save