From 58c6239e852f525fc0afa3ab689e860ea3943913 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 27 Oct 2013 10:02:26 +0100 Subject: [PATCH 1/3] g2meet: stop using deprecated avcodec_set_dimensions --- libavcodec/g2meet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c index e7743e7e9f..0b4a8b718f 100644 --- a/libavcodec/g2meet.c +++ b/libavcodec/g2meet.c @@ -702,7 +702,7 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data, goto header_fail; } if (c->width != avctx->width || c->height != avctx->height) - avcodec_set_dimensions(avctx, c->width, c->height); + ff_set_dimensions(avctx, c->width, c->height); c->compression = bytestream2_get_be32(&bc); if (c->compression != 2 && c->compression != 3) { av_log(avctx, AV_LOG_ERROR, From 8255535c5f2da4e1363fae1f942b9ed28ce7552b Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 27 Oct 2013 10:02:26 +0100 Subject: [PATCH 2/3] gifdec: stop using deprecated avcodec_set_dimensions --- libavcodec/gifdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c index a233797717..136d1127d2 100644 --- a/libavcodec/gifdec.c +++ b/libavcodec/gifdec.c @@ -292,9 +292,9 @@ static int gif_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, return ret; avctx->pix_fmt = AV_PIX_FMT_PAL8; - if ((ret = av_image_check_size(s->screen_width, s->screen_height, 0, avctx)) < 0) + + if ((ret = ff_set_dimensions(avctx, s->screen_width, s->screen_height)) < 0) return ret; - avcodec_set_dimensions(avctx, s->screen_width, s->screen_height); if ((ret = ff_get_buffer(avctx, picture, 0)) < 0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); From 3b086317277e3f3b61c0343930d8e2570b278bd6 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 27 Oct 2013 10:02:26 +0100 Subject: [PATCH 3/3] h26[13]dec: stop using deprecated avcodec_set_dimensions --- libavcodec/h261dec.c | 5 ++++- libavcodec/h263dec.c | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index 479da77958..4842fa0dd3 100644 --- a/libavcodec/h261dec.c +++ b/libavcodec/h261dec.c @@ -29,6 +29,7 @@ #include "mpegvideo.h" #include "h263.h" #include "h261.h" +#include "internal.h" #define H261_MBA_VLC_BITS 9 #define H261_MTYPE_VLC_BITS 6 @@ -607,7 +608,9 @@ retry: s->parse_context = pc; } if (!s->context_initialized) { - avcodec_set_dimensions(avctx, s->width, s->height); + ret = ff_set_dimensions(avctx, s->width, s->height); + if (ret < 0) + return ret; goto retry; } diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 8060d8f284..c52fc00515 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -600,7 +600,9 @@ int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, /* H.263 could change picture size any time */ s->context_reinit = 0; - avcodec_set_dimensions(avctx, s->width, s->height); + ret = ff_set_dimensions(avctx, s->width, s->height); + if (ret < 0) + return ret; if ((ret = ff_MPV_common_frame_size_change(s))) return ret;