diff nuv.c @ 5657:ec46684cc8ad libavcodec

Make sure rtjpeg quality is a valid value
author reimar
date Sun, 09 Sep 2007 09:16:47 +0000
parents 3f7d66453c2e
children 0dc21d071895
line wrap: on
line diff
--- a/nuv.c	Sun Sep 09 09:00:12 2007 +0000
+++ b/nuv.c	Sun Sep 09 09:16:47 2007 +0000
@@ -97,6 +97,7 @@
  */
 static void get_quant_quality(NuvContext *c, int quality) {
     int i;
+    quality = FFMAX(quality, 1);
     for (i = 0; i < 64; i++) {
         c->lq[i] = (fallback_lquant[i] << 7) / quality;
         c->cq[i] = (fallback_cquant[i] << 7) / quality;