mirror of
https://github.com/libretro/RetroArch
synced 2025-03-14 01:19:01 +00:00
Allocate before activation.
This commit is contained in:
parent
4395f124ca
commit
343852af26
@ -130,6 +130,9 @@ static void* __jack_init(const char* device, unsigned rate, unsigned latency)
|
||||
if ( jd == NULL )
|
||||
return NULL;
|
||||
|
||||
pthread_cond_init(&jd->cond, NULL);
|
||||
pthread_mutex_init(&jd->cond_lock, NULL);
|
||||
|
||||
const char **jports = NULL;
|
||||
|
||||
jd->client = jack_client_open("SSNES", JackNullOption, NULL);
|
||||
@ -148,7 +151,6 @@ static void* __jack_init(const char* device, unsigned rate, unsigned latency)
|
||||
SSNES_ERR("Failed to register ports.\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
||||
char *dest_ports[2];
|
||||
jports = jack_get_ports(jd->client, NULL, NULL, JackPortIsPhysical | JackPortIsInput);
|
||||
@ -191,9 +193,6 @@ static void* __jack_init(const char* device, unsigned rate, unsigned latency)
|
||||
}
|
||||
}
|
||||
|
||||
pthread_cond_init(&jd->cond, NULL);
|
||||
pthread_mutex_init(&jd->cond_lock, NULL);
|
||||
|
||||
jack_free(jports);
|
||||
return jd;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user