nuv: dont try to copy an empty frame
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 13 Dec 2012 23:30:34 +0000 (00:30 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 13 Dec 2012 23:31:18 +0000 (00:31 +0100)
Fixes assertion failure

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

index 67c9c0f..ff11d00 100644 (file)
@@ -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: