Merge commit 'c7a5acabc537c2ce363165c31250aba341b1a990'

* commit 'c7a5acabc537c2ce363165c31250aba341b1a990':
  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: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-11-01 13:40:01 +01:00
commit f016a23c7f
4 changed files with 8 additions and 10 deletions

View File

@ -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;
}

View File

@ -245,10 +245,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;

View File

@ -30,6 +30,7 @@
#include "dirac.h"
#include "avcodec.h"
#include "golomb.h"
#include "internal.h"
#include "mpeg12data.h"
/* defaults for source parameters */
@ -317,11 +318,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);

View File

@ -377,9 +377,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_thread_get_buffer(avctx, &frame, 0)) < 0)