move thread creation closer to where it belongs
This commit is contained in:
parent
d006bc6707
commit
aa017e881b
1 changed files with 1 additions and 1 deletions
|
|
@ -268,6 +268,7 @@ public class MovieCoder {
|
||||||
EncodingProcess ep;
|
EncodingProcess ep;
|
||||||
ep = new EncodingProcess(file, thumbnail, targetSize);
|
ep = new EncodingProcess(file, thumbnail, targetSize);
|
||||||
currentEncodings.put(key, ep);
|
currentEncodings.put(key, ep);
|
||||||
|
new Thread(ep).start();
|
||||||
return ep;
|
return ep;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -559,7 +560,6 @@ public class MovieCoder {
|
||||||
// If neither we need to start the encoding process
|
// If neither we need to start the encoding process
|
||||||
if (chunk == null && ep == null) {
|
if (chunk == null && ep == null) {
|
||||||
ep = submitEncodingJob(file, thumbnail, targetSize, key);
|
ep = submitEncodingJob(file, thumbnail, targetSize, key);
|
||||||
new Thread(ep).start();
|
|
||||||
}
|
}
|
||||||
return new VideoStreamer(key, ep, chunk);
|
return new VideoStreamer(key, ep, chunk);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue