diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2024-06-30 20:45:42 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2024-06-30 20:45:42 +0200 |
commit | 26d8dd51f3ecc4bd6861ed5155acb3090a1983d4 (patch) | |
tree | 08d9369065e32f20a80f9cf916a5b1a468b39527 /src/book.vala | |
parent | 1676db749dc23da9fcd9c767de2f1e9a0c61b2b2 (diff) |
New upstream version 46.0upstream/46.0upstream
Diffstat (limited to 'src/book.vala')
-rw-r--r-- | src/book.vala | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/book.vala b/src/book.vala index e25eb35..7f8d048 100644 --- a/src/book.vala +++ b/src/book.vala @@ -237,7 +237,8 @@ private class BookSaver encoder = new ThreadPool<EncodeTask>.with_owned_data (encode_delegate, (int) get_num_processors (), false); /* Configure a writer */ - ThreadFunc<Error?>? write_delegate = null; + Thread<Error?> writer; + switch (mime_type) { case "image/jpeg": @@ -245,13 +246,15 @@ private class BookSaver #if HAVE_WEBP case "image/webp": #endif - write_delegate = write_multifile; + writer = new Thread<Error?> (null, write_multifile); break; case "application/pdf": - write_delegate = write_pdf; + writer = new Thread<Error?> (null, write_pdf); + break; + default: + writer = new Thread<Error?> (null, () => null); break; } - var writer = new Thread<Error?> (null, write_delegate); /* Issue encode tasks */ for (var i = 0; i < n_pages; i++) |