diff --git a/veejay-current/veejay-server/libsample/sampleadm.c b/veejay-current/veejay-server/libsample/sampleadm.c index 88945f9a..a5fd9302 100644 --- a/veejay-current/veejay-server/libsample/sampleadm.c +++ b/veejay-current/veejay-server/libsample/sampleadm.c @@ -785,7 +785,7 @@ int sample_apply_fader_inc(int s1, int *method) { *method = si->fade_method; if(si->fader_val > 255.0 ) si->fader_val = 255.0; if(si->fader_val < 0.0 ) si->fader_val = 0.0; - if(si->fader_direction) return si->fader_val; + if(si->fader_direction >= 0) return si->fader_val; return (255-si->fader_val); } diff --git a/veejay-current/veejay-server/libstream/v4l2utils.c b/veejay-current/veejay-server/libstream/v4l2utils.c index e222f041..76a7e456 100644 --- a/veejay-current/veejay-server/libstream/v4l2utils.c +++ b/veejay-current/veejay-server/libstream/v4l2utils.c @@ -1962,7 +1962,6 @@ static void *v4l2_grabber_thread( void *v ) i->stop = 1; unlock_(v); veejay_msg(VEEJAY_MSG_ERROR, "v4l2: Not a device file: %s" , i->file ); - pthread_exit(NULL); return NULL; } @@ -1971,7 +1970,6 @@ static void *v4l2_grabber_thread( void *v ) i->stop = 1; veejay_msg(0, "v4l2: error opening v4l2 device '%s'",i->file ); unlock_(v); - pthread_exit(NULL); return NULL; } @@ -1992,7 +1990,6 @@ static void *v4l2_grabber_thread( void *v ) v4l2_close( v4l2 ); veejay_msg(0, "v4l2: error allocating memory" ); unlock_(v); - pthread_exit(NULL); return NULL; } diff --git a/veejay-current/veejay-server/libstream/vj-tag.c b/veejay-current/veejay-server/libstream/vj-tag.c index d4ebd38b..bbaafa60 100644 --- a/veejay-current/veejay-server/libstream/vj-tag.c +++ b/veejay-current/veejay-server/libstream/vj-tag.c @@ -1245,7 +1245,7 @@ int vj_tag_del(int id) int i; tag = vj_tag_get(id); if(!tag) - return 0; + return 0; #ifdef HAVE_FREETYPE vj_font_dictionary_destroy(_tag_info->font ,tag->dict); #endif @@ -1524,7 +1524,7 @@ int vj_tag_apply_fader_inc(int t1, int *method) { *method = tag->fade_method; if(tag->fader_val > 255.0 ) tag->fader_val = 255.0; if(tag->fader_val < 0.0) tag->fader_val = 0.0; - if(tag->fader_direction) return tag->fader_val; + if(tag->fader_direction >= 0) return tag->fader_val; return (255-tag->fader_val); } @@ -2779,15 +2779,6 @@ void vj_tag_get_source_name(int t1, char *dst) } } -void vj_tag_get_method_filename(int t1, char *dst) -{ - vj_tag *tag = vj_tag_get(t1); - if (tag) { - if(tag->method_filename != NULL) sprintf(dst, "%s", tag->method_filename); - } -} - - void vj_tag_get_by_type(int type, char *description ) { switch (type) { @@ -4048,11 +4039,32 @@ void tagParseStreamFX(char *sampleFile, xmlDocPtr doc, xmlNodePtr cur, void *fon if( source_type == VJ_TAG_TYPE_V4L && extra_data ) sscanf( extra_data, "%d",&zer ); - vj_tag_del( id ); + //vj_tag_del( id ); + + int n_id = id; - int n_id = vj_tag_new( source_type, source_file, _tag_info->nstreams,_tag_info->current_edit_list, + vj_tag *cur_tag = vj_tag_get( id ); + int identity = 0; + if( cur_tag ) { + char *cur_src_file = cur_tag->method_filename; + int type = cur_tag->source_type; + if(cur_src_file && source_file) { + if(strncasecmp(cur_tag->method_filename, source_file,strlen(cur_tag->method_filename)) == 0 && type == source_type) { + identity = 1; + } + } + } + + if(!identity) { + if(cur_tag) + vj_tag_del(id); + + + n_id = vj_tag_new( source_type, source_file, _tag_info->nstreams,_tag_info->current_edit_list, _tag_info->pixel_format, source_id,zer, _tag_info->settings->composite ); + } + if(n_id > 0 ) { vj_tag *tag = vj_tag_get( n_id );