]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
DVR: fix the info substitution (regression from 812c2e257f1758c37a8cb3c03967ad86315c2...
authorJaroslav Kysela <perex@perex.cz>
Mon, 5 Oct 2015 19:31:56 +0000 (21:31 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 5 Oct 2015 19:32:29 +0000 (21:32 +0200)
src/dvr/dvr_rec.c

index e55465e9ef71909892eadccf8e4aecdcff89e7c3..47483fc413a7d56b9efb03bcc1ed6349045ab8f4 100644 (file)
@@ -1237,17 +1237,13 @@ dvr_spawn_postproc(dvr_entry_t *de, const char *dvr_postproc)
   buf2 = tvh_strdupa(buf1);
   /* Substitute filename formatters */
   htsstr_substitute(buf2, buf1, sizeof(buf1), '%', dvr_subs_postproc_filename, filename, tmp, sizeof(tmp));
+  buf2 = tvh_strdupa(buf1);
   /* Substitute info formatters */
   htsstr_substitute(buf2, buf1, sizeof(buf1), '%', dvr_subs_postproc_info, info, tmp, sizeof(tmp));
 
   args = htsstr_argsplit(buf1);
-  /* no arguments at all */
-  if(!args[0]) {
-    htsstr_argsplit_free(args);
-    return;
-  }
-
-  spawnv(args[0], (void *)args, NULL, 1, 1);
+  if(args[0])
+    spawnv(args[0], (void *)args, NULL, 1, 1);
     
   htsstr_argsplit_free(args);
 }