]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
DVR: correct logic in dvr_thread_rec_start()
authorJaroslav Kysela <perex@perex.cz>
Wed, 18 Oct 2017 09:18:29 +0000 (11:18 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 18 Oct 2017 09:18:29 +0000 (11:18 +0200)
src/dvr/dvr_rec.c

index 28700a274331c38956f031c60c56d92501bc51da..e08307687c527d7bf22bd5169560e6f4c3061c2e 100644 (file)
@@ -1184,8 +1184,9 @@ dvr_thread_rec_start(dvr_entry_t **_de, streaming_start_t *ss,
   profile_chain_t *prch = de->de_chain;
   int ret = 0;
 
-  if (*started &&
-      muxer_reconfigure(prch->prch_muxer, ss) < 0) {
+  if (*started) {
+    if (muxer_reconfigure(prch->prch_muxer, ss) >= 0)
+      return 1;
     tvhwarn(LS_DVR, "Unable to reconfigure \"%s\"",
             dvr_get_filename(de) ?: lang_str_get(de->de_title, NULL));
 
@@ -1203,8 +1204,6 @@ dvr_thread_rec_start(dvr_entry_t **_de, streaming_start_t *ss,
       *_de = dvr_entry_clone(de);
     dvr_thread_global_unlock(de);
     de = *_de;
-  } else {
-    ret = 1;
   }
 
   if (!*started) {