mirror of
https://github.com/game-stop/veejay.git
synced 2026-01-06 06:55:31 +01:00
fix crash on loading samplelist
This commit is contained in:
@@ -334,8 +334,6 @@ void *plug_get_by_so_name( char *soname )
|
||||
if( str == NULL )
|
||||
continue;
|
||||
|
||||
veejay_msg(0, "'%s' vs '%s'", str,soname );
|
||||
|
||||
if( strcmp( soname,str ) == 0 )
|
||||
return index_map_[i];
|
||||
}
|
||||
@@ -343,6 +341,19 @@ void *plug_get_by_so_name( char *soname )
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int plug_get_idx_by_name( char *name )
|
||||
{
|
||||
int i;
|
||||
int len = strlen(name);
|
||||
for( i = 0; i < index_; i ++ ) {
|
||||
char *plugname = plug_get_name( i );
|
||||
if( strncasecmp( name, plugname, len ) == 0 ) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
void *plug_get( int fx_id ) {
|
||||
return index_map_[fx_id];
|
||||
|
||||
@@ -52,5 +52,6 @@ int plug_find_generator_plugins(int *total, int seq );
|
||||
void *plug_get( int fd_id );
|
||||
vj_effect *plug_get_plugin( int fx_id );
|
||||
void *plug_get_by_so_name( char *soname );
|
||||
int plug_get_idx_by_name( char *name);
|
||||
int plug_get_idx_by_so_name( char *soname );
|
||||
#endif
|
||||
|
||||
@@ -1113,8 +1113,15 @@ int _vj_tag_new_unicap( vj_tag * tag, int stream_nr, int width, int height, int
|
||||
if( filename != NULL ) {
|
||||
channel = plug_get_idx_by_so_name( filename );
|
||||
if( channel == -1 ) {
|
||||
veejay_msg(0, "'%s' not found.",filename );
|
||||
return -1;
|
||||
channel = plug_get_idx_by_name( filename );
|
||||
if( channel == - 1) {
|
||||
veejay_msg(0, "'%s' not found.",filename );
|
||||
if( vj_tag_del( tag->id ) == 0 ) {
|
||||
free(tag->source_name );
|
||||
free(tag);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1122,7 +1129,7 @@ int _vj_tag_new_unicap( vj_tag * tag, int stream_nr, int width, int height, int
|
||||
|
||||
int foo_arg = vj_shm_get_id();
|
||||
|
||||
if( extra != 0 ) //@ vj_shm_set_id is a hack
|
||||
if( extra != 0 ) //@ vj_shm_set_id is a hack FIXME
|
||||
vj_shm_set_id( extra );
|
||||
|
||||
tag->generator = plug_activate(channel);
|
||||
@@ -1384,7 +1391,7 @@ int vj_tag_del(int id)
|
||||
break;
|
||||
case VJ_TAG_TYPE_GENERATOR:
|
||||
if( tag->generator ) {
|
||||
//plug_deactivate( tag->generator );
|
||||
plug_deactivate( tag->generator );
|
||||
}
|
||||
tag->generator = NULL;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user