1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Michael Niedermayer 2013-11-01 15:07:25 +01:00
commit bf92cd8178
4 changed files with 10 additions and 12 deletions

View File

@ -956,7 +956,7 @@ static int decode_frame_headers(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
free_frame_buffers(ctx); free_frame_buffers(ctx);
if ((res = allocate_frame_buffers(ctx, avctx, width, height)) < 0) if ((res = allocate_frame_buffers(ctx, avctx, width, height)) < 0)
return res; return res;
avcodec_set_dimensions(avctx, width, height); ff_set_dimensions(avctx, width, height);
} }
y_offset = bytestream2_get_le32(&gb); y_offset = bytestream2_get_le32(&gb);

View File

@ -1056,7 +1056,10 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
if (!ctx->is_nonnull_frame(ctx)) if (!ctx->is_nonnull_frame(ctx))
return buf_size; 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) if ((result = ff_get_buffer(avctx, frame, 0)) < 0)
return result; return result;

View File

@ -60,12 +60,10 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
h = (buf[1] + 1) * 8; h = (buf[1] + 1) * 8;
buf += 2; buf += 2;
if ((res = av_image_check_size(w, h, 0, avctx)) < 0)
return res;
if (w != avctx->width || h != avctx->height) { if (w != avctx->width || h != avctx->height) {
av_frame_unref(c->prev); 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; maxcnt = w * h;

View File

@ -32,6 +32,7 @@
#include "libavutil/pixfmt.h" #include "libavutil/pixfmt.h"
#include "libavutil/opt.h" #include "libavutil/opt.h"
#include "avcodec.h" #include "avcodec.h"
#include "internal.h"
#include "thread.h" #include "thread.h"
#if HAVE_OPENJPEG_1_5_OPENJPEG_H #if HAVE_OPENJPEG_1_5_OPENJPEG_H
@ -296,13 +297,9 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
width = image->x1 - image->x0; width = image->x1 - image->x0;
height = image->y1 - image->y0; height = image->y1 - image->y0;
if ((ret = av_image_check_size(width, height, 0, avctx)) < 0) { ret = ff_set_dimensions(avctx, width, height);
av_log(avctx, AV_LOG_ERROR, if (ret < 0)
"%dx%d dimension invalid.\n", width, height);
goto done; goto done;
}
avcodec_set_dimensions(avctx, width, height);
if (avctx->pix_fmt != AV_PIX_FMT_NONE) if (avctx->pix_fmt != AV_PIX_FMT_NONE)
if (!libopenjpeg_matches_pix_fmt(image, avctx->pix_fmt)) if (!libopenjpeg_matches_pix_fmt(image, avctx->pix_fmt))