On Sun, 11 Aug 2013 16:30:59 +0200, Luca Barbato <[email protected]> wrote:
> CC: [email protected]
> ---
> 
> It should cover all the cases through all the codebase.
> 
>  libavcodec/utils.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/libavcodec/utils.c b/libavcodec/utils.c
> index ebec08b..e296fab 100644
> --- a/libavcodec/utils.c
> +++ b/libavcodec/utils.c
> @@ -753,7 +753,9 @@ int ff_reget_buffer(AVCodecContext *avctx, AVFrame *frame)
>      }
> 
>      av_image_copy(frame->data, frame->linesize, tmp.data, tmp.linesize,
> -                  frame->format, frame->width, frame->height);
> +                  frame->format,
> +                  FFMIN(frame->width, tmp.width),
> +                  FFMIN(frame->height, tmp.height));
> 
>      av_frame_unref(&tmp);
> 

Can this happen in a normal use case?
I mean wouldn't it be better to returning an error instead?

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to