fix refresh_frame color_model test
authorGood Guy <good1.2guy@gmail.com>
Sun, 22 Oct 2017 02:54:07 +0000 (20:54 -0600)
committerGood Guy <good1.2guy@gmail.com>
Sun, 22 Oct 2017 02:54:07 +0000 (20:54 -0600)
cinelerra-5.1/cinelerra/canvas.C
cinelerra-5.1/cinelerra/vdevicex11.C
cinelerra-5.1/guicast/bcresources.C

index e07dd33923c9e4a04c1da01e982f955715cedce9..9f3ddc3b6e7d6cac46b5520164eda2419e5603a0 100644 (file)
@@ -859,7 +859,8 @@ void Canvas::update_refresh(VideoDevice *device, VFrame *output_frame)
 
        if( refresh_frame &&
           (refresh_frame->get_w() != device->out_w ||
-           refresh_frame->get_h() != device->out_h ) ) {
+           refresh_frame->get_h() != device->out_h ||
+           refresh_frame->get_color_model() != best_color_model ) ) {
 // x11 direct render uses BC_BGR8888, use tranfer_from to remap
                delete refresh_frame;  refresh_frame = 0;
        }
index c0ca4b08357df010a1d85b04532b38ede2ece028..a92986c1e6c7d695c74b67c2ad36dbab76d551a2 100644 (file)
@@ -236,11 +236,11 @@ int VDeviceX11::get_display_colormodel(int file_colormodel)
 
        if( device->out_config->driver == PLAYBACK_X11_GL ) {
                if( file_colormodel == BC_RGB888 ||
-                       file_colormodel == BC_RGBA8888 ||
-                       file_colormodel == BC_YUV888 ||
-                       file_colormodel == BC_YUVA8888 ||
-                       file_colormodel == BC_RGB_FLOAT ||
-                       file_colormodel == BC_RGBA_FLOAT ) {
+                   file_colormodel == BC_RGBA8888 ||
+                   file_colormodel == BC_YUV888 ||
+                   file_colormodel == BC_YUVA8888 ||
+                   file_colormodel == BC_RGB_FLOAT ||
+                   file_colormodel == BC_RGBA_FLOAT ) {
                        return file_colormodel;
                }
                
@@ -257,13 +257,6 @@ int VDeviceX11::get_display_colormodel(int file_colormodel)
                }
        }
 
-// 2 more colormodels are supported by OpenGL
-       if( device->out_config->driver == PLAYBACK_X11_GL ) {
-               if( file_colormodel == BC_RGB_FLOAT ||
-                   file_colormodel == BC_RGBA_FLOAT )
-                       result = file_colormodel;
-       }
-
        if( result < 0 ) {
                switch( file_colormodel ) {
                case BC_RGB888:
index 521b7740bc087a2560c497b69f25bc07e3cbcd30..38053d0943d67970ebaf45fdbdd760788cbfad65 100644 (file)
@@ -242,7 +242,6 @@ suffix_to_type_t BC_Resources::suffix_to_type[] =
     { "mkv", ICON_FILM },
     { "mov", ICON_FILM },
     { "mp4", ICON_FILM },
-    { "m4p", ICON_FILM },
     { "mpe", ICON_FILM },
     { "mpeg", ICON_FILM },
     { "mpg", ICON_FILM },