Browse Source

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>
tags/n2.2-rc1
Michael Niedermayer 11 years ago
parent
commit
ffd100b111
4 changed files with 12 additions and 12 deletions
  1. +4
    -6
      libavcodec/sunrast.c
  2. +4
    -1
      libavcodec/svq1dec.c
  3. +2
    -3
      libavcodec/targa.c
  4. +2
    -2
      libavcodec/tiff.c

+ 4
- 6
libavcodec/sunrast.c 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;



+ 4
- 1
libavcodec/svq1dec.c 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 &&


+ 2
- 3
libavcodec/targa.c 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;


+ 2
- 2
libavcodec/tiff.c 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;


Loading…
Cancel
Save