提交 a8773938 编写于 作者: A Anton Khirnov

eatgv: stop using deprecated avcodec_set_dimensions

上级 06e7a202
......@@ -269,9 +269,10 @@ static int tgv_decode_frame(AVCodecContext *avctx,
s->width = AV_RL16(&buf[0]);
s->height = AV_RL16(&buf[2]);
if (s->avctx->width != s->width || s->avctx->height != s->height) {
avcodec_set_dimensions(s->avctx, s->width, s->height);
av_freep(&s->frame_buffer);
av_frame_unref(&s->last_frame);
if ((ret = ff_set_dimensions(s->avctx, s->width, s->height)) < 0)
return ret;
}
pal_count = AV_RL16(&buf[6]);
......@@ -282,9 +283,6 @@ static int tgv_decode_frame(AVCodecContext *avctx,
}
}
if ((ret = av_image_check_size(s->width, s->height, 0, avctx)) < 0)
return ret;
if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0)
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册