fix multithreading on copy
This commit is contained in:
parent
4b9690938d
commit
462b989f6e
|
@ -236,8 +236,9 @@ fn transcode_files(
|
||||||
for _ in 0..threads {
|
for _ in 0..threads {
|
||||||
s.spawn(|| loop {
|
s.spawn(|| loop {
|
||||||
let mut jobs = jobs.lock().unwrap();
|
let mut jobs = jobs.lock().unwrap();
|
||||||
|
|
||||||
let job = jobs.pop();
|
let job = jobs.pop();
|
||||||
|
drop(jobs);
|
||||||
|
|
||||||
if let Some(job) = job {
|
if let Some(job) = job {
|
||||||
let result = transcode_file(&job, ©_args, &transcode_config, true);
|
let result = transcode_file(&job, ©_args, &transcode_config, true);
|
||||||
if let Err(err) = result {
|
if let Err(err) = result {
|
||||||
|
|
Loading…
Reference in a new issue