Commit bf688d23 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'ec706300'

* commit 'ec706300':
  eatqi: stop using deprecated avcodec_set_dimensions
  eatgv: stop using deprecated avcodec_set_dimensions
  eatgq: stop using deprecated avcodec_set_dimensions
  eamad: stop using deprecated avcodec_set_dimensions

Conflicts:
	libavcodec/eamad.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 4a356512 ec706300
......@@ -263,12 +263,11 @@ static int decode_frame(AVCodecContext *avctx,
}
if (avctx->width != width || avctx->height != height) {
av_frame_unref(&s->last_frame);
if((width * height)/2048*7 > buf_end-buf)
return AVERROR_INVALIDDATA;
if ((ret = av_image_check_size(width, height, 0, avctx)) < 0)
if ((ret = ff_set_dimensions(avctx, width, height)) < 0)
return ret;
avcodec_set_dimensions(avctx, width, height);
av_frame_unref(&s->last_frame);
}
if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0)
......
......@@ -219,9 +219,10 @@ static int tgq_decode_frame(AVCodecContext *avctx,
s->height = bytestream2_get_le16u(&s->gb);
}
if (s->avctx->width!=s->width || s->avctx->height!=s->height) {
avcodec_set_dimensions(s->avctx, s->width, s->height);
}
ret = ff_set_dimensions(s->avctx, s->width, s->height);
if (ret < 0)
return ret;
tgq_calculate_qtable(s, bytestream2_get_byteu(&s->gb));
bytestream2_skip(&s->gb, 3);
......
......@@ -281,9 +281,10 @@ static int tgv_decode_frame(AVCodecContext *avctx,
s->width = AV_RL16(&buf[0]);
s->height = AV_RL16(&buf[2]);
if (s->avctx->width != s->width || s->avctx->height != s->height) {
avcodec_set_dimensions(s->avctx, s->width, s->height);
av_freep(&s->frame_buffer);
av_frame_unref(&s->last_frame);
if ((ret = ff_set_dimensions(s->avctx, s->width, s->height)) < 0)
return ret;
}
pal_count = AV_RL16(&buf[6]);
......@@ -294,9 +295,6 @@ static int tgv_decode_frame(AVCodecContext *avctx,
}
}
if ((ret = av_image_check_size(s->width, s->height, 0, avctx)) < 0)
return ret;
if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0)
return ret;
......
......@@ -111,8 +111,9 @@ static int tqi_decode_frame(AVCodecContext *avctx,
tqi_calculate_qtable(s, buf[4]);
buf += 8;
if (s->avctx->width!=s->width || s->avctx->height!=s->height)
avcodec_set_dimensions(s->avctx, s->width, s->height);
ret = ff_set_dimensions(s->avctx, s->width, s->height);
if (ret < 0)
return ret;
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
return ret;
......
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