X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Ftitler%2Ftitler.C;h=c1e46f209fac7e67f9173d991c071ea0f47ef9fa;hb=78871039cd6acf5ec257bd8c8e94c83ef81dc45a;hp=d0f4f681ca08fddd629e7cffa36f392c6aa8317f;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/plugins/titler/titler.C b/cinelerra-5.1/plugins/titler/titler.C index d0f4f681..c1e46f20 100644 --- a/cinelerra-5.1/plugins/titler/titler.C +++ b/cinelerra-5.1/plugins/titler/titler.C @@ -146,7 +146,7 @@ int TitleConfig::equivalent(TitleConfig &that) // EQUIV(pixels_per_second, that.pixels_per_second) && wlen == that.wlen && !memcmp(wtext, that.wtext, wlen * sizeof(wchar_t)) && -// title_x == that.title_x && title_y == that.title_y && + title_x == that.title_x && title_y == that.title_y && title_w == that.title_w && title_h == that.title_h && // window_w == that.window_w && window_h == that.window_h && timecode == that.timecode && @@ -1339,7 +1339,8 @@ int TitleParser::wget(wchar_t &wch) int ich; while( (ich=wnext()) >= 0 ) { if( ich == '\\' ) { - if( (ich=wnext()) == '\n' ) continue; + if( (ich=wnext()) < 0 ) break; + if( !ich || ich == '\n' ) continue; wch = ich; return 0; } @@ -2147,7 +2148,7 @@ void TitleMain::draw_overlay() //printf("TitleMain::draw_overlay 1\n"); fade = 1; if( !EQUIV(config.fade_in, 0) ) { - int64_t plugin_start = server->plugin->startproject; + int64_t plugin_start = get_startproject(); int64_t fade_len = lroundf(config.fade_in * PluginVClient::project_frame_rate); int64_t fade_position = get_source_position() - plugin_start; @@ -2156,7 +2157,7 @@ void TitleMain::draw_overlay() } } if( !EQUIV(config.fade_out, 0) ) { - int64_t plugin_end = server->plugin->startproject + server->plugin->length; + int64_t plugin_end = get_endproject(); int64_t fade_len = lroundf(config.fade_out * PluginVClient::project_frame_rate); int64_t fade_position = plugin_end - get_source_position(); @@ -2458,16 +2459,14 @@ int TitleMain::process_realtime(VFrame *input_ptr, VFrame *output_ptr) void TitleMain::update_gui() { - if( thread ) { - int reconfigure = load_configuration(); - if( reconfigure ) { - TitleWindow *window = (TitleWindow*)thread->window; - window->lock_window("TitleMain::update_gui"); - window->update(); - window->unlock_window(); - window->color_thread->update_gui(config.color, 0); - } + if( !thread ) return; + thread->window->lock_window("TitleMain::update_gui"); + TitleWindow *window = (TitleWindow*)thread->window; + if( load_configuration() ) { + window->update_gui(); + window->flush(); } + window->unlock_window(); } int TitleMain::load_configuration()