aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-09-24 04:58:24 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-09-25 03:43:23 +0200
commitaea15df3b4c264b5b13d5f85341f52c7ec756c6f (patch)
tree5dc79be97eaaf8b9ae3545f90d4fe6261dafab3a /libavcodec
parentd8676140decd42dc6b8fa2e693ba7d2fd79c1578 (diff)
downloadffmpeg-aea15df3b4c264b5b13d5f85341f52c7ec756c6f.tar.gz
ffv1dec: change bitstream end check to a exact check instead of a +-1 check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ffv1.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index 210400b712..e8fccb66ea 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -1706,8 +1706,10 @@ static int decode_slice(AVCodecContext *c, void *arg){
decode_rgb_frame(fs, planes, width, height, p->linesize);
}
if(fs->ac && f->version > 2) {
- int v = fs->c.bytestream_end - fs->c.bytestream - 3 - 5*f->ec;
- if(v != -1 && v!= 0) {
+ int v;
+ get_rac(&fs->c, (int[]){129});
+ v = fs->c.bytestream_end - fs->c.bytestream - 2 - 5*f->ec;
+ if(v) {
av_log(f->avctx, AV_LOG_ERROR, "bytestream end mismatching by %d\n", v);
fs->slice_damaged = 1;
}