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

Merge commit 'ec7063005ee67c0b4d4b83aa5118dd22ad1094e8'

* commit 'ec7063005ee67c0b4d4b83aa5118dd22ad1094e8':
  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: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-11-01 14:09:17 +01:00
commit bf688d23b5
4 changed files with 11 additions and 12 deletions

View File

@ -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)

View File

@ -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);

View File

@ -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;

View File

@ -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;