]> git.sesse.net Git - mlt/commitdiff
Fix regression initializing coefficients.
authorDan Dennedy <dan@dennedy.org>
Thu, 21 Apr 2011 21:39:45 +0000 (14:39 -0700)
committerDan Dennedy <dan@dennedy.org>
Thu, 21 Apr 2011 21:39:45 +0000 (14:39 -0700)
src/modules/avformat/filter_avcolour_space.c
src/modules/avformat/producer_avformat.c

index 37f0db1524d650d23f96ed6ecf49f4ac43c2175d..b8685dcf20d01c7501cf0581e9751bf07f066977 100644 (file)
@@ -77,7 +77,7 @@ static void set_luma_transfer( struct SwsContext *context, int colorspace, int u
 {
 #if defined(SWSCALE) && (LIBSWSCALE_VERSION_INT >= ((0<<16)+(7<<8)+2))
        int *coefficients;
-       const int *new_coefficients = coefficients;
+       const int *new_coefficients;
        int full_range;
        int brightness, contrast, saturation;
 
@@ -101,6 +101,9 @@ static void set_luma_transfer( struct SwsContext *context, int colorspace, int u
                case 709:
                        new_coefficients = sws_getCoefficients( SWS_CS_ITU709 );
                        break;
+               default:
+                       new_coefficients = coefficients;
+                       break;
                }
                sws_setColorspaceDetails( context, new_coefficients, full_range, new_coefficients, full_range,
                        brightness, contrast, saturation );
index fdfe51b625df56d263915cb2d72e06ea14ee517d..97f2df749959a5a135c0e6e5d0ef69836ed7ea3f 100644 (file)
@@ -871,7 +871,7 @@ static void set_luma_transfer( struct SwsContext *context, int colorspace, int u
 {
 #if defined(SWSCALE) && (LIBSWSCALE_VERSION_INT >= ((0<<16)+(7<<8)+2))
        int *coefficients;
-       const int *new_coefficients = coefficients;
+       const int *new_coefficients;
        int full_range;
        int brightness, contrast, saturation;
 
@@ -895,6 +895,9 @@ static void set_luma_transfer( struct SwsContext *context, int colorspace, int u
                case 709:
                        new_coefficients = sws_getCoefficients( SWS_CS_ITU709 );
                        break;
+               default:
+                       new_coefficients = coefficients;
+                       break;
                }
                sws_setColorspaceDetails( context, new_coefficients, full_range, new_coefficients, full_range,
                        brightness, contrast, saturation );