From: Good Guy Date: Sun, 22 Oct 2017 02:54:07 +0000 (-0600) Subject: fix refresh_frame color_model test X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=296147f865b3572c7e2ecdb47a5d827956221188;p=goodguy%2Fhistory.git fix refresh_frame color_model test --- diff --git a/cinelerra-5.1/cinelerra/canvas.C b/cinelerra-5.1/cinelerra/canvas.C index e07dd339..9f3ddc3b 100644 --- a/cinelerra-5.1/cinelerra/canvas.C +++ b/cinelerra-5.1/cinelerra/canvas.C @@ -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; } diff --git a/cinelerra-5.1/cinelerra/vdevicex11.C b/cinelerra-5.1/cinelerra/vdevicex11.C index c0ca4b08..a92986c1 100644 --- a/cinelerra-5.1/cinelerra/vdevicex11.C +++ b/cinelerra-5.1/cinelerra/vdevicex11.C @@ -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: diff --git a/cinelerra-5.1/guicast/bcresources.C b/cinelerra-5.1/guicast/bcresources.C index 521b7740..38053d09 100644 --- a/cinelerra-5.1/guicast/bcresources.C +++ b/cinelerra-5.1/guicast/bcresources.C @@ -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 },