Commit f016a23c authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'c7a5acab'

* commit 'c7a5acab':
  dnxhddec: stop using deprecated avcodec_set_dimensions
  dirac: stop using deprecated avcodec_set_dimensions
  cdxl: stop using deprecated avcodec_set_dimensions
  avs: stop using deprecated avcodec_set_dimensions
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 5ef0c005 c7a5acab
...@@ -160,7 +160,7 @@ static av_cold int avs_decode_init(AVCodecContext * avctx) ...@@ -160,7 +160,7 @@ static av_cold int avs_decode_init(AVCodecContext * avctx)
{ {
AvsContext *s = avctx->priv_data; AvsContext *s = avctx->priv_data;
avctx->pix_fmt = AV_PIX_FMT_PAL8; 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); avcodec_get_frame_defaults(&s->picture);
return 0; return 0;
} }
......
...@@ -245,10 +245,8 @@ static int cdxl_decode_frame(AVCodecContext *avctx, void *data, ...@@ -245,10 +245,8 @@ static int cdxl_decode_frame(AVCodecContext *avctx, void *data,
return AVERROR_PATCHWELCOME; 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; return ret;
if (w != avctx->width || h != avctx->height)
avcodec_set_dimensions(avctx, w, h);
aligned_width = FFALIGN(c->avctx->width, 16); aligned_width = FFALIGN(c->avctx->width, 16);
c->padded_bits = aligned_width - c->avctx->width; c->padded_bits = aligned_width - c->avctx->width;
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "dirac.h" #include "dirac.h"
#include "avcodec.h" #include "avcodec.h"
#include "golomb.h" #include "golomb.h"
#include "internal.h"
#include "mpeg12data.h" #include "mpeg12data.h"
/* defaults for source parameters */ /* defaults for source parameters */
...@@ -317,11 +318,10 @@ int avpriv_dirac_parse_sequence_header(AVCodecContext *avctx, GetBitContext *gb, ...@@ -317,11 +318,10 @@ int avpriv_dirac_parse_sequence_header(AVCodecContext *avctx, GetBitContext *gb,
if (ret = parse_source_parameters(avctx, gb, source)) if (ret = parse_source_parameters(avctx, gb, source))
return ret; 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; return ret;
avcodec_set_dimensions(avctx, source->width, source->height);
/* [DIRAC_STD] picture_coding_mode shall be 0 for fields and 1 for frames /* [DIRAC_STD] picture_coding_mode shall be 0 for fields and 1 for frames
* currently only used to signal field coding */ * currently only used to signal field coding */
picture_coding_mode = svq3_get_ue_golomb(gb); picture_coding_mode = svq3_get_ue_golomb(gb);
......
...@@ -377,9 +377,9 @@ static int dnxhd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, ...@@ -377,9 +377,9 @@ static int dnxhd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
first_field = 1; first_field = 1;
} }
if (av_image_check_size(ctx->width, ctx->height, 0, avctx)) ret = ff_set_dimensions(avctx, ctx->width, ctx->height);
return -1; if (ret < 0)
avcodec_set_dimensions(avctx, ctx->width, ctx->height); return ret;
if (first_field) { if (first_field) {
if ((ret = ff_thread_get_buffer(avctx, &frame, 0)) < 0) if ((ret = ff_thread_get_buffer(avctx, &frame, 0)) < 0)
......
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