diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2024-06-30 20:45:44 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2024-06-30 20:45:44 +0200 |
commit | bca1cc8681bbaf662dabc961f84b06adc1255e08 (patch) | |
tree | 9c387fef03143f2f5f809672bf51e6495f874050 /src/book.vala | |
parent | a675d0fb9f307b714d0b9cf19690d2b08b666d7c (diff) | |
parent | 26d8dd51f3ecc4bd6861ed5155acb3090a1983d4 (diff) |
Update upstream source from tag 'upstream/46.0'
Update to upstream version '46.0'
with Debian dir a64ff9f87cc10b162225618b62823763d5ea1d65
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++) |