Commit bf92cd81 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '967cd6fa'

* commit '967cd6fa':
  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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents e6b9d71a 967cd6fa
......@@ -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);
......
......@@ -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;
......
......@@ -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;
......
......@@ -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))
......
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