Re: [libav-devel] [PATCH 23/50] gifdec: stop using deprecated avcodec_set_dimensions

2013-10-27 Thread Justin Ruggles
On 10/27/2013 06:10 AM, Anton Khirnov wrote:
> ---
>  libavcodec/gifdec.c |5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c
> index a233797..4814230 100644
> --- a/libavcodec/gifdec.c
> +++ b/libavcodec/gifdec.c
> @@ -292,9 +292,10 @@ 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)
> +
> +ret = ff_set_dimensions(avctx, s->screen_width, s->screen_height);
> +if (ret < 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");

Ok

-Justin

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH 23/50] gifdec: stop using deprecated avcodec_set_dimensions

2013-10-27 Thread Anton Khirnov
---
 libavcodec/gifdec.c |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c
index a233797..4814230 100644
--- a/libavcodec/gifdec.c
+++ b/libavcodec/gifdec.c
@@ -292,9 +292,10 @@ 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)
+
+ret = ff_set_dimensions(avctx, s->screen_width, s->screen_height);
+if (ret < 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");
-- 
1.7.10.4

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel