refactor tasks

This commit is contained in:
veejay
2023-10-11 04:12:58 +02:00
parent 16154d18d8
commit b0a2aa1cd8
3 changed files with 2 additions and 5 deletions

View File

@@ -188,7 +188,7 @@ int avhelper_set_num_decoders() {
}
else {
veejay_msg(VEEJAY_MSG_DEBUG, "env VEEJAY_NUM_DECODE_THREADS not set!");
int n = task_num_cpus();
int n = vj_task_get_num_cpus();
if( n > 1 )
n_threads = 2;
if( n > 3 )

View File

@@ -379,8 +379,6 @@ int veejay_free(veejay_t * info)
veejay_playback_close(info);
vj_mem_threaded_stop();
vj_event_destroy(info);
vj_tag_free();
@@ -3055,7 +3053,7 @@ int veejay_main(veejay_t * info)
/* Flush the Linux File buffers to disk */
//sync();
if( task_num_cpus() > 1 ) {
if( vj_task_get_num_cpus() > 1 ) {
CPU_ZERO( &cpuset );
CPU_SET ( 0, &cpuset ); /* run on the first cpu */

View File

@@ -838,7 +838,6 @@ int main(int argc, char **argv)
info = veejay_malloc();
if (!info) {
vj_mem_threaded_stop();
return 1;
}