From f176e11cff74d1b6d01a1d3ef0b23410c7757a34 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 27 Oct 2013 10:02:26 +0100 Subject: [PATCH 1/4] avs: stop using deprecated avcodec_set_dimensions --- libavcodec/avs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/avs.c b/libavcodec/avs.c index 6ff6d26be3..8e70a90c9c 100644 --- a/libavcodec/avs.c +++ b/libavcodec/avs.c @@ -160,7 +160,7 @@ static av_cold int avs_decode_init(AVCodecContext * avctx) { AvsContext *s = avctx->priv_data; avctx->pix_fmt = AV_PIX_FMT_PAL8; - avcodec_set_dimensions(avctx, 318, 198); + ff_set_dimensions(avctx, 318, 198); avcodec_get_frame_defaults(&s->picture); return 0; } From d57e95cbd492e6f3a6bda0b724aeec44c200e833 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 27 Oct 2013 10:02:26 +0100 Subject: [PATCH 2/4] cdxl: stop using deprecated avcodec_set_dimensions --- libavcodec/cdxl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavcodec/cdxl.c b/libavcodec/cdxl.c index b198c4ca0a..679bf60108 100644 --- a/libavcodec/cdxl.c +++ b/libavcodec/cdxl.c @@ -237,10 +237,8 @@ static int cdxl_decode_frame(AVCodecContext *avctx, void *data, return AVERROR_PATCHWELCOME; } - if ((ret = av_image_check_size(w, h, 0, avctx)) < 0) + if ((ret = ff_set_dimensions(avctx, w, h)) < 0) return ret; - if (w != avctx->width || h != avctx->height) - avcodec_set_dimensions(avctx, w, h); aligned_width = FFALIGN(c->avctx->width, 16); c->padded_bits = aligned_width - c->avctx->width; From e9cfbc2b531df6e92593624003edab970629d3c2 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 27 Oct 2013 10:02:26 +0100 Subject: [PATCH 3/4] dirac: stop using deprecated avcodec_set_dimensions --- libavcodec/dirac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/dirac.c b/libavcodec/dirac.c index e11fea761e..f0fb85dd3d 100644 --- a/libavcodec/dirac.c +++ b/libavcodec/dirac.c @@ -29,6 +29,7 @@ #include "dirac.h" #include "avcodec.h" #include "golomb.h" +#include "internal.h" #include "mpeg12data.h" // defaults for source parameters @@ -311,11 +312,10 @@ int avpriv_dirac_parse_sequence_header(AVCodecContext *avctx, GetBitContext *gb, if (ret = parse_source_parameters(avctx, gb, source)) return ret; - if (ret = av_image_check_size(source->width, source->height, 0, avctx)) + ret = ff_set_dimensions(avctx, source->width, source->height); + if (ret < 0) return ret; - avcodec_set_dimensions(avctx, source->width, source->height); - /* [DIRAC_STD] picture_coding_mode shall be 0 for fields and 1 for frames * currently only used to signal field coding */ picture_coding_mode = svq3_get_ue_golomb(gb); From c7a5acabc537c2ce363165c31250aba341b1a990 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 27 Oct 2013 10:02:26 +0100 Subject: [PATCH 4/4] dnxhddec: stop using deprecated avcodec_set_dimensions --- libavcodec/dnxhddec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c index f7b8a22fec..5c29b3e139 100644 --- a/libavcodec/dnxhddec.c +++ b/libavcodec/dnxhddec.c @@ -347,9 +347,9 @@ static int dnxhd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, first_field = 1; } - if (av_image_check_size(ctx->width, ctx->height, 0, avctx)) - return -1; - avcodec_set_dimensions(avctx, ctx->width, ctx->height); + ret = ff_set_dimensions(avctx, ctx->width, ctx->height); + if (ret < 0) + return ret; if (first_field) { if ((ret = ff_get_buffer(avctx, picture, 0)) < 0) {