video-converter: don't do dither when set to NONE
authorWim Taymans <wtaymans@redhat.com>
Wed, 28 Jan 2015 16:29:45 +0000 (17:29 +0100)
committerWim Taymans <wtaymans@redhat.com>
Wed, 28 Jan 2015 16:29:45 +0000 (17:29 +0100)
gst-libs/gst/video/video-converter.c

index efe6557bc876fd08f102e7933b49804900301a68..69e82114d66585c52d180f352d2e0a2b93197f7f 100644 (file)
@@ -1500,6 +1500,9 @@ chain_dither (GstVideoConverter * convert, GstLineCache * prev)
   guint quant[4], target_quant;
 
   method = GET_OPT_DITHER_METHOD (convert);
+  if (method == GST_VIDEO_DITHER_NONE)
+    return prev;
+
   target_quant = GET_OPT_DITHER_QUANTIZATION (convert);
   GST_DEBUG ("method %d, target-quantization %d", method, target_quant);