summaryrefslogtreecommitdiff
path: root/src/rmd.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2021-04-28 19:28:14 -0700
committerVito Caputo <vcaputo@pengaru.com>2021-04-28 19:28:14 -0700
commit3812a302cefcccbeb9bc46ed5c55710eb4c0512e (patch)
tree0699a192560cd2e9d50a363a1929af7f794ed43c /src/rmd.c
parent64eed5bc02c0a4e09423aa67f118a2a7c8bc69b0 (diff)
encode_cache: handle pthread_create() errors
switch to using rmdThread() and handle errors previously pthread_create() errors were completely unnoticed
Diffstat (limited to 'src/rmd.c')
-rw-r--r--src/rmd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rmd.c b/src/rmd.c
index b3a1af2..9fe2867 100644
--- a/src/rmd.c
+++ b/src/rmd.c
@@ -158,8 +158,10 @@ int main(int argc, char **argv)
//encode and then cleanup cache
if (!pdata.args.encOnTheFly && !pdata.args.no_encode) {
- if (!pdata.aborted)
- rmdEncodeCache(&pdata);
+ if (!pdata.aborted) {
+ if (rmdEncodeCache(&pdata))
+ return 1;
+ }
fprintf(stderr, "Cleanning up cache...\n");
if (rmdPurgeCache(pdata.cache_data, !pdata.args.nosound))
© All Rights Reserved