From: Jaroslav Kysela Date: Mon, 5 Oct 2015 19:31:56 +0000 (+0200) Subject: DVR: fix the info substitution (regression from 812c2e257f1758c37a8cb3c03967ad86315c2... X-Git-Tag: v4.2.1~1988 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=75f4f0de5fceb1e891f09cc93aa96526ee02bf82;p=thirdparty%2Ftvheadend.git DVR: fix the info substitution (regression from 812c2e257f1758c37a8cb3c03967ad86315c2f4c), fixes #3133 --- diff --git a/src/dvr/dvr_rec.c b/src/dvr/dvr_rec.c index e55465e9e..47483fc41 100644 --- a/src/dvr/dvr_rec.c +++ b/src/dvr/dvr_rec.c @@ -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); }