Commit 01507ab3 authored by Paul B Mahol's avatar Paul B Mahol

avcodec/sanm: stop using deprecated avcodec_set_dimensions()

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 73d88773
......@@ -738,11 +738,10 @@ static int process_frame_obj(SANMVideoContext *ctx)
}
if (ctx->width < left + w || ctx->height < top + h) {
if (av_image_check_size(FFMAX(left + w, ctx->width),
FFMAX(top + h, ctx->height), 0, ctx->avctx) < 0)
return AVERROR_INVALIDDATA;
avcodec_set_dimensions(ctx->avctx, FFMAX(left + w, ctx->width),
FFMAX(top + h, ctx->height));
int ret = ff_set_dimensions(ctx->avctx, FFMAX(left + w, ctx->width),
FFMAX(top + h, ctx->height));
if (ret < 0)
return ret;
init_sizes(ctx, FFMAX(left + w, ctx->width),
FFMAX(top + h, ctx->height));
if (init_buffers(ctx)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment