From: Good Guy Date: Thu, 25 Oct 2018 15:18:03 +0000 (-0600) Subject: repair default keyframe load, tweak init default histogram threshold X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=2e48b660e37eb5c661264d601211e16cb6cd6e89;p=goodguy%2Fhistory.git repair default keyframe load, tweak init default histogram threshold --- diff --git a/cinelerra-5.1/cinelerra/pluginclient.C b/cinelerra-5.1/cinelerra/pluginclient.C index f1fe25b9..7f1fdd04 100644 --- a/cinelerra-5.1/cinelerra/pluginclient.C +++ b/cinelerra-5.1/cinelerra/pluginclient.C @@ -30,6 +30,7 @@ #include "edlsession.h" #include "file.h" #include "filesystem.h" +#include "filexml.h" #include "indexable.h" #include "language.h" #include "localsession.h" @@ -557,9 +558,12 @@ void PluginClient::load_defaults_xml() int data_size = fread(data, 1, sz, fp); if( data_size < 0 ) data_size = 0; if( data_size > 0 ) { + data[data_size] = 0; + temp_keyframe.xbuf->oseek(data_size); // Get window extents - int state = 0; - for( int i=0; i<(data_size-8) && data[i]!='<'; ++i ) { + int i = 0; + for( int state=0; i<(data_size-8) && state>=0; ++i ) { + if( !data[i] || data[i] == '<' ) break; if( !isdigit(data[i]) ) continue; if( !state ) { window_x = atoi(data + i); @@ -567,11 +571,11 @@ void PluginClient::load_defaults_xml() } else { window_y = atoi(data + i); - break; + state = -1; } while( iiseek(i); read_data(&temp_keyframe); } diff --git a/cinelerra-5.1/plugins/histogram/histogramconfig.C b/cinelerra-5.1/plugins/histogram/histogramconfig.C index 32da6086..7203063f 100644 --- a/cinelerra-5.1/plugins/histogram/histogramconfig.C +++ b/cinelerra-5.1/plugins/histogram/histogramconfig.C @@ -50,7 +50,7 @@ void HistogramConfig::reset(int do_mode) { automatic = 0; automatic_v = 0; - threshold = 0.1; + threshold = 1.0; } } diff --git a/cinelerra-5.1/plugins/histogram_bezier/bistogramconfig.C b/cinelerra-5.1/plugins/histogram_bezier/bistogramconfig.C index 267f2560..88c4911d 100644 --- a/cinelerra-5.1/plugins/histogram_bezier/bistogramconfig.C +++ b/cinelerra-5.1/plugins/histogram_bezier/bistogramconfig.C @@ -190,7 +190,7 @@ void HistogramConfig::reset(int do_mode) if(do_mode) { automatic = 0; - threshold = 0.1; + threshold = 1.0; split = 0; smoothMode = 0; }