[FFmpeg-cvslog] Check sizes a bit in ffplay, cant hurt.

Michael Niedermayer git at videolan.org
Wed Apr 6 23:46:56 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Apr  6 23:39:57 2011 +0200| [8bce71dff5a7fd2851c4718c274d8b2a94fb595c] | committer: Michael Niedermayer

Check sizes a bit in ffplay, cant hurt.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8bce71dff5a7fd2851c4718c274d8b2a94fb595c
---

 ffplay.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/ffplay.c b/ffplay.c
index c44264e..8c1ea31 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1582,6 +1582,9 @@ static int input_get_buffer(AVCodecContext *codec, AVFrame *pic)
     int i, w, h, stride[4];
     unsigned edge;
 
+    if(av_image_check_size(w, h, 0, codec))
+        return -1;
+
     if (codec->codec->capabilities & CODEC_CAP_NEG_LINESIZES)
         perms |= AV_PERM_NEG_LINESIZES;
 



More information about the ffmpeg-cvslog mailing list