changeset 8788:5e9e735cd793 libavcodec

Add a default (error) for the switch in case of an unsupported PIX_FMT. Removes warnings about possibly uninitialized variables. Patch by Patrik Kullman %patrik A yes P nu%
author gpoirier
date Tue, 10 Feb 2009 12:38:56 +0000
parents 9575568668c4
children b2a991a936e1
files imgconvert.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/imgconvert.c	Tue Feb 10 11:29:31 2009 +0000
+++ b/imgconvert.c	Tue Feb 10 12:38:56 2009 +0000
@@ -473,6 +473,8 @@
         case PIX_FMT_GRAY8:
             r=b=g= i;
             break;
+        default:
+            return -1;
         }
         pal[i] =  b + (g<<8) + (r<<16);
     }