aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-01 15:07:25 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-01 15:07:25 +0100
commitbf92cd8178e0553a27971118e2b2b9e87e7b810b (patch)
tree3cab52ceebfa519d6a8eaccc123e81bcab48f45f
parente6b9d71ad9569b5d033058958da5155100ada1ab (diff)
parent967cd6fafbf2fdec9cbe011296ad34a70212427e (diff)
downloadffmpeg-bf92cd8178e0553a27971118e2b2b9e87e7b810b.tar.gz
Merge commit '967cd6fafbf2fdec9cbe011296ad34a70212427e'
* commit '967cd6fafbf2fdec9cbe011296ad34a70212427e': libopenjpegdec: stop using deprecated avcodec_set_dimensions kgv1dec: stop using deprecated avcodec_set_dimensions ivi_common: stop using deprecated avcodec_set_dimensions indeo3: stop using deprecated avcodec_set_dimensions Conflicts: libavcodec/ivi_common.c libavcodec/kgv1dec.c libavcodec/libopenjpegdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/indeo3.c2
-rw-r--r--libavcodec/ivi_common.c5
-rw-r--r--libavcodec/kgv1dec.c6
-rw-r--r--libavcodec/libopenjpegdec.c9
4 files changed, 10 insertions, 12 deletions
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index b8827634e1..ddb4ad0dee 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -956,7 +956,7 @@ static int decode_frame_headers(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
free_frame_buffers(ctx);
if ((res = allocate_frame_buffers(ctx, avctx, width, height)) < 0)
return res;
- avcodec_set_dimensions(avctx, width, height);
+ ff_set_dimensions(avctx, width, height);
}
y_offset = bytestream2_get_le32(&gb);
diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index ab4c9958c4..9b5f5f876e 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -1056,7 +1056,10 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
if (!ctx->is_nonnull_frame(ctx))
return buf_size;
- avcodec_set_dimensions(avctx, ctx->planes[0].width, ctx->planes[0].height);
+ result = ff_set_dimensions(avctx, ctx->planes[0].width, ctx->planes[0].height);
+ if (result < 0)
+ return result;
+
if ((result = ff_get_buffer(avctx, frame, 0)) < 0)
return result;
diff --git a/libavcodec/kgv1dec.c b/libavcodec/kgv1dec.c
index f793137306..328a555b62 100644
--- a/libavcodec/kgv1dec.c
+++ b/libavcodec/kgv1dec.c
@@ -60,12 +60,10 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
h = (buf[1] + 1) * 8;
buf += 2;
- if ((res = av_image_check_size(w, h, 0, avctx)) < 0)
- return res;
-
if (w != avctx->width || h != avctx->height) {
av_frame_unref(c->prev);
- avcodec_set_dimensions(avctx, w, h);
+ if ((res = ff_set_dimensions(avctx, w, h)) < 0)
+ return res;
}
maxcnt = w * h;
diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c
index 93f47a21d5..0543e3a897 100644
--- a/libavcodec/libopenjpegdec.c
+++ b/libavcodec/libopenjpegdec.c
@@ -32,6 +32,7 @@
#include "libavutil/pixfmt.h"
#include "libavutil/opt.h"
#include "avcodec.h"
+#include "internal.h"
#include "thread.h"
#if HAVE_OPENJPEG_1_5_OPENJPEG_H
@@ -296,13 +297,9 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
width = image->x1 - image->x0;
height = image->y1 - image->y0;
- if ((ret = av_image_check_size(width, height, 0, avctx)) < 0) {
- av_log(avctx, AV_LOG_ERROR,
- "%dx%d dimension invalid.\n", width, height);
+ ret = ff_set_dimensions(avctx, width, height);
+ if (ret < 0)
goto done;
- }
-
- avcodec_set_dimensions(avctx, width, height);
if (avctx->pix_fmt != AV_PIX_FMT_NONE)
if (!libopenjpeg_matches_pix_fmt(image, avctx->pix_fmt))