From aa017e881bdedccaffb6a29ae6fbbf38afa720b6 Mon Sep 17 00:00:00 2001 From: Knut Forkalsrud Date: Sun, 13 Jul 2014 16:58:19 -0700 Subject: [PATCH] move thread creation closer to where it belongs --- src/main/java/org/forkalsrud/album/video/MovieCoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/forkalsrud/album/video/MovieCoder.java b/src/main/java/org/forkalsrud/album/video/MovieCoder.java index 74aa18d..1fc36eb 100644 --- a/src/main/java/org/forkalsrud/album/video/MovieCoder.java +++ b/src/main/java/org/forkalsrud/album/video/MovieCoder.java @@ -268,6 +268,7 @@ public class MovieCoder { EncodingProcess ep; ep = new EncodingProcess(file, thumbnail, targetSize); currentEncodings.put(key, ep); + new Thread(ep).start(); return ep; } @@ -559,7 +560,6 @@ public class MovieCoder { // If neither we need to start the encoding process if (chunk == null && ep == null) { ep = submitEncodingJob(file, thumbnail, targetSize, key); - new Thread(ep).start(); } return new VideoStreamer(key, ep, chunk); }