summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-01 13:40:01 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-01 13:40:04 +0100
commitf016a23c7fa0b089a394e25eeefa5d5f4d99d926 (patch)
tree150ac256bf70e36cdf7f072209d3871f0ede55ac /libavcodec
parent5ef0c00580e25afa32d5a6ef86559ffb9ce3b2dc (diff)
parentc7a5acabc537c2ce363165c31250aba341b1a990 (diff)
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>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/avs.c2
-rw-r--r--libavcodec/cdxl.c4
-rw-r--r--libavcodec/dirac.c6
-rw-r--r--libavcodec/dnxhddec.c6
4 files changed, 8 insertions, 10 deletions
diff --git a/libavcodec/avs.c b/libavcodec/avs.c
index 065345b5cd..abfe54de13 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;
}
diff --git a/libavcodec/cdxl.c b/libavcodec/cdxl.c
index 93a5537e3e..13ad57c8c1 100644
--- a/libavcodec/cdxl.c
+++ b/libavcodec/cdxl.c
@@ -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;
diff --git a/libavcodec/dirac.c b/libavcodec/dirac.c
index e132acc44a..3dad75a30c 100644
--- a/libavcodec/dirac.c
+++ b/libavcodec/dirac.c
@@ -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);
diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c
index 15e6c679e4..42775dfd2b 100644
--- a/libavcodec/dnxhddec.c
+++ b/libavcodec/dnxhddec.c
@@ -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)