X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fvc2enc.c;h=0a8c3633ef84204efadd58c10b59ab0f0b651167;hb=b212eff773b860d6f7da0f29d49947bd384f718f;hp=96e27d93ede2d905721edc68252ce5313cfef949;hpb=b5e2974b64e5b1192bc4f1c42f8cc294d076e33e;p=ffmpeg diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c index 96e27d93ede..0a8c3633ef8 100644 --- a/libavcodec/vc2enc.c +++ b/libavcodec/vc2enc.c @@ -1063,7 +1063,7 @@ static av_cold int vc2_encode_init(AVCodecContext *avctx) { Plane *p; SubBand *b; - int i, j, level, o, shift; + int i, j, level, o, shift, ret; const AVPixFmtDescriptor *fmt = av_pix_fmt_desc_get(avctx->pix_fmt); const int depth = fmt->comp[0].depth; VC2EncContext *s = avctx->priv_data; @@ -1138,7 +1138,9 @@ static av_cold int vc2_encode_init(AVCodecContext *avctx) } /* Chroma subsampling */ - avcodec_get_chroma_sub_sample(avctx->pix_fmt, &s->chroma_x_shift, &s->chroma_y_shift); + ret = av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt, &s->chroma_x_shift, &s->chroma_y_shift); + if (ret) + return ret; /* Bit depth and color range index */ if (depth == 8 && avctx->color_range == AVCOL_RANGE_JPEG) { @@ -1190,7 +1192,8 @@ static av_cold int vc2_encode_init(AVCodecContext *avctx) /* DWT init */ if (ff_vc2enc_init_transforms(&s->transform_args[i].t, s->plane[i].coef_stride, - s->plane[i].dwt_height)) + s->plane[i].dwt_height, + s->slice_width, s->slice_height)) goto alloc_fail; }