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

--
1.8.3.2

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

Reply via email to