Add a default (error) for the switch in case of an unsupported PIX_FMT.
authorPatrik Kullman <patrik@yes.nu>
Tue, 10 Feb 2009 12:38:56 +0000 (12:38 +0000)
committerGuillaume Poirier <gpoirier@mplayerhq.hu>
Tue, 10 Feb 2009 12:38:56 +0000 (12:38 +0000)
Removes warnings about possibly uninitialized variables.
Patch by Patrik Kullman %patrik A yes P nu%

Originally committed as revision 17130 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/imgconvert.c

index 7e52ea3..abc253e 100644 (file)
@@ -473,6 +473,8 @@ int ff_set_systematic_pal(uint32_t pal[256], enum PixelFormat pix_fmt){
         case PIX_FMT_GRAY8:
             r=b=g= i;
             break;
+        default:
+            return -1;
         }
         pal[i] =  b + (g<<8) + (r<<16);
     }