X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fmss2.c;h=9434a740a7cf49cefc5ea2df03b60a80bb4a27e4;hb=37d742b607d47122d23d548ffd7ad9b09cbc5298;hp=2eb366ee780c7261f720658661bc3f919f18a886;hpb=1c9ac700dd141e545538a824f5a8cb81bb0a375d;p=ffmpeg diff --git a/libavcodec/mss2.c b/libavcodec/mss2.c index 2eb366ee780..9434a740a7c 100644 --- a/libavcodec/mss2.c +++ b/libavcodec/mss2.c @@ -152,6 +152,7 @@ static void arith2_init(ArithCoder *c, GetByteContext *gB) c->low = 0; c->high = 0xFFFFFF; c->value = bytestream2_get_be24(gB); + c->overread = 0; c->gbc.gB = gB; c->get_model_sym = arith2_get_model_sym; c->get_number = arith2_get_number; @@ -411,8 +412,6 @@ static int decode_wmv9(AVCodecContext *avctx, const uint8_t *buf, int buf_size, ff_mpeg_er_frame_start(s); - v->bits = buf_size * 8; - v->end_mb_x = (w + 15) >> 4; s->end_mb_y = (h + 15) >> 4; if (v->respic & 1) @@ -617,7 +616,7 @@ static int mss2_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, return AVERROR_INVALIDDATA; } } else { - if ((ret = ff_reget_buffer(avctx, ctx->last_pic)) < 0) + if ((ret = ff_reget_buffer(avctx, ctx->last_pic, 0)) < 0) return ret; if ((ret = av_frame_ref(frame, ctx->last_pic)) < 0) return ret;