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:
parent
91ba181a15
commit
7bbc686f82
@ -99,12 +99,18 @@ 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)){
|
||||||
|
if(state == VC1_CODE_SEQHDR || state == VC1_CODE_ENTRYPOINT){
|
||||||
|
charged=1;
|
||||||
|
}else if(charged){
|
||||||
return i-3;
|
return i-3;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user