client keyframe fix when tweak set, clean up, ffmpeg plugin.opts from andrea, about...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / keyframe.C
index cd8c6a3eb7194c0555a1ce4ed4db86d6fd997ac2..cdeebd642cf6bce2fcb6d07dcb920a41e53afba3 100644 (file)
@@ -247,44 +247,24 @@ void KeyFrame::update_parameter(BC_Hash *params,
 
 
 void KeyFrame::get_diff(KeyFrame *src,
-       BC_Hash **params,
-       char **text,
-       char **extra)
+               BC_Hash **params, char **text, char **extra)
 {
-       const int debug = 0;
-       FileXML input;
-       input.set_shared_input(data, strlen(data));
-       BC_Hash this_params;
-       char *this_text = 0;
-       char *this_extra = 0;
-       BC_Hash src_parameters;
-       char *src_text = 0;
-       char *src_extra = 0;
+       BC_Hash this_params;  char *this_text = 0, *this_extra = 0;
+       BC_Hash src_params;   char *src_text = 0,  *src_extra = 0;
 
        get_contents(&this_params, &this_text, &this_extra);
-       src->get_contents(&src_parameters, &src_text, &src_extra);
-
-if(debug) printf("KeyFrame::get_diff %d %d %d\n",
-__LINE__,
-this_params.size(),
-src_parameters.size());
+       src->get_contents(&src_params, &src_text, &src_extra);
 
 // Capture changed parameters
        char this_value[BCTEXTLEN];
-       for(int i = 0; i < MIN(this_params.size(), src_parameters.size()); i++)
-       {
-               const char *src_key = src_parameters.get_key(i);
-               const char *src_value = src_parameters.get_value(i);
+       int m = MIN(this_params.size(), src_params.size());
+       for( int i=0; i<m; ++i ) {
+               const char *src_key = src_params.get_key(i);
+               const char *src_value = src_params.get_value(i);
                this_value[0] = 0;
                this_params.get(src_key, this_value);
-if(debug) printf("KeyFrame::get_diff %d %s %s %s\n",
-__LINE__,
-src_key,
-src_value,
-this_value);
 // Capture values which differ
-               if(strcmp(src_value, this_value))
-               {
+               if( strcmp(src_value, this_value) ) {
                        if(!(*params)) (*params) = new BC_Hash;
                        (*params)->update(src_key, src_value);
                }
@@ -292,13 +272,12 @@ this_value);
 
 
 // Capture text        which differs
-       if( !this_text || strcmp(this_text, src_text))
+       if( !this_text || strcmp(this_text, src_text) )
                (*text) = cstrdup(src_text);
 
-       if( !this_extra || strcmp(this_extra, src_extra))
+       if( !this_extra || strcmp(this_extra, src_extra) )
                (*extra) = cstrdup(src_extra);
 
-
        delete [] this_text;
        delete [] this_extra;
        delete [] src_text;