changeset 30275:e5c5eccd8d84

Simplify reset_ptr(): employ usePal() macro rather than enumerating all the paletted formats.
author stefano
date Sat, 16 Jan 2010 11:08:16 +0000
parents ef801d917cc1
children a4f0e79d7d14
files libswscale/swscale.c
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libswscale/swscale.c	Sat Jan 16 10:48:23 2010 +0000
+++ b/libswscale/swscale.c	Sat Jan 16 11:08:16 2010 +0000
@@ -2935,12 +2935,8 @@
         src[3]=NULL;
     if(!isPlanarYUV(format)) {
         src[3]=src[2]=NULL;
-        if(   format != PIX_FMT_PAL8
-           && format != PIX_FMT_RGB8
-           && format != PIX_FMT_BGR8
-           && format != PIX_FMT_RGB4_BYTE
-           && format != PIX_FMT_BGR4_BYTE
-          )
+
+        if (!usePal(format))
             src[1]= NULL;
     }
 }