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

Merge commit 'c265b8bb7638546919465e3585441b1d40c4b13d'

* commit 'c265b8bb7638546919465e3585441b1d40c4b13d':
  tiff: stop using deprecated avcodec_set_dimensions
  targa: stop using deprecated avcodec_set_dimensions
  svq1dec: stop using deprecated avcodec_set_dimensions
  sunrast: stop using deprecated avcodec_set_dimensions

Conflicts:
	libavcodec/sunrast.c
	libavcodec/targa.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-11-01 15:43:29 +01:00
commit ffd100b111
4 changed files with 12 additions and 12 deletions

View File

@ -61,10 +61,6 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
av_log(avctx, AV_LOG_ERROR, "invalid (compression) type\n");
return AVERROR_INVALIDDATA;
}
if (av_image_check_size(w, h, 0, avctx)) {
av_log(avctx, AV_LOG_ERROR, "invalid image size\n");
return AVERROR_INVALIDDATA;
}
if (maptype == RMT_RAW) {
avpriv_request_sample(avctx, "Unknown colormap type");
return AVERROR_PATCHWELCOME;
@ -100,8 +96,10 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
return AVERROR_INVALIDDATA;
}
if (w != avctx->width || h != avctx->height)
avcodec_set_dimensions(avctx, w, h);
ret = ff_set_dimensions(avctx, w, h);
if (ret < 0)
return ret;
if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
return ret;

View File

@ -638,7 +638,10 @@ static int svq1_decode_frame(AVCodecContext *avctx, void *data,
av_dlog(avctx, "Error in svq1_decode_frame_header %i\n", result);
return result;
}
avcodec_set_dimensions(avctx, s->width, s->height);
result = ff_set_dimensions(avctx, s->width, s->height);
if (result < 0)
return result;
if ((avctx->skip_frame >= AVDISCARD_NONREF && s->nonref) ||
(avctx->skip_frame >= AVDISCARD_NONKEY &&

View File

@ -173,10 +173,9 @@ static int decode_frame(AVCodecContext *avctx,
return AVERROR_INVALIDDATA;
}
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);
if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
return ret;
p->pict_type = AV_PICTURE_TYPE_I;

View File

@ -546,9 +546,9 @@ static int init_image(TiffContext *s, ThreadFrame *frame)
return AVERROR_INVALIDDATA;
}
if (s->width != s->avctx->width || s->height != s->avctx->height) {
if ((ret = av_image_check_size(s->width, s->height, 0, s->avctx)) < 0)
ret = ff_set_dimensions(s->avctx, s->width, s->height);
if (ret < 0)
return ret;
avcodec_set_dimensions(s->avctx, s->width, s->height);
}
if ((ret = ff_thread_get_buffer(s->avctx, frame, 0)) < 0)
return ret;