changeset 23188:6431b46104b7

test if color conv fonction exists prior to using it
author benoit
date Wed, 02 May 2007 07:00:10 +0000
parents 20be83485595
children 9eeca842d5b1
files libswscale/swscale.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libswscale/swscale.c	Tue May 01 23:04:21 2007 +0000
+++ b/libswscale/swscale.c	Wed May 02 07:00:10 2007 +0000
@@ -1611,6 +1611,8 @@
                sws_format_name(srcFormat), sws_format_name(dstFormat));
     }
 
+    if(conv)
+    {
     if (dstStride[0]*srcBpp == srcStride[0]*dstBpp)
         conv(src[0], dst[0] + dstStride[0]*srcSliceY, srcSliceH*srcStride[0]);
     else
@@ -1626,6 +1628,7 @@
             dstPtr+= dstStride[0];
         }
     }
+    }
     return srcSliceH;
 }