[FFmpeg-cvslog] nuv: dont try to copy an empty frame

Michael Niedermayer git at videolan.org
Fri Dec 14 02:52:16 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Dec 14 00:30:34 2012 +0100| [56d09250ef44eebd04f6d4cf6c6f5bfbe46b01dc] | committer: Michael Niedermayer

nuv: dont try to copy an empty frame

Fixes assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/nuv.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c
index 67c9c0f..ff11d00 100644
--- a/libavcodec/nuv.c
+++ b/libavcodec/nuv.c
@@ -262,7 +262,8 @@ retry:
             av_log(avctx, AV_LOG_ERROR, "uncompressed frame too short\n");
             height = buf_size / c->width / 3 * 2;
         }
-        copy_frame(&c->pic, buf, c->width, height);
+        if(height > 0)
+            copy_frame(&c->pic, buf, c->width, height);
         break;
     }
     case NUV_RTJPEG_IN_LZO:



More information about the ffmpeg-cvslog mailing list