Commit 7bbc686f authored by Michael Niedermayer's avatar Michael Niedermayer

Fix vc1 split().

Fixes Subtitle-sample.evo, issue52.

Originally committed as revision 17533 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 91ba181a
...@@ -99,11 +99,17 @@ static int vc1_split(AVCodecContext *avctx, ...@@ -99,11 +99,17 @@ static int vc1_split(AVCodecContext *avctx,
{ {
int i; int i;
uint32_t state= -1; uint32_t state= -1;
int charged=0;
for(i=0; i<buf_size; i++){ for(i=0; i<buf_size; i++){
state= (state<<8) | buf[i]; state= (state<<8) | buf[i];
if(IS_MARKER(state) && state != VC1_CODE_SEQHDR && state != VC1_CODE_ENTRYPOINT) if(IS_MARKER(state)){
return i-3; if(state == VC1_CODE_SEQHDR || state == VC1_CODE_ENTRYPOINT){
charged=1;
}else if(charged){
return i-3;
}
}
} }
return 0; return 0;
} }
......
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