diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2009-02-22 20:48:12 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2009-02-22 20:48:12 +0000 |
commit | 7bbc686f82146dfdc5201dc43c9d90b466d0f065 (patch) | |
tree | 4bd4d42f271a00496d69271bc0a70d84236a06e2 /libavcodec | |
parent | 91ba181a15b1cb3c3683edf1928e9eb3446782b4 (diff) | |
download | ffmpeg-7bbc686f82146dfdc5201dc43c9d90b466d0f065.tar.gz |
Fix vc1 split().
Fixes Subtitle-sample.evo, issue52.
Originally committed as revision 17533 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vc1_parser.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libavcodec/vc1_parser.c b/libavcodec/vc1_parser.c index a9baccce79..3f4618dbed 100644 --- a/libavcodec/vc1_parser.c +++ b/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; } |