From: Jaroslav Kysela Date: Mon, 3 Oct 2016 18:00:14 +0000 (+0200) Subject: fix tsdebug, fixes #4006 X-Git-Tag: v4.2.1~291 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=592bdb82532153c181407513317b8d601fa4baa9;p=thirdparty%2Ftvheadend.git fix tsdebug, fixes #4006 --- diff --git a/src/input/mpegts.h b/src/input/mpegts.h index f958131a7..aa9a68b13 100644 --- a/src/input/mpegts.h +++ b/src/input/mpegts.h @@ -991,7 +991,7 @@ tsdebug_write(mpegts_mux_t *mm, uint8_t *buf, size_t len) #if ENABLE_TSDEBUG if (mm && mm->mm_tsdebug_fd2 >= 0) if (write(mm->mm_tsdebug_fd2, buf, len) != len) - tvherror("tsdebug", "unable to write input data (%i)", errno); + tvherror(LS_TSDEBUG, "unable to write input data (%i)", errno); #endif } diff --git a/src/input/mpegts/mpegts_input.c b/src/input/mpegts/mpegts_input.c index bac147518..47b348503 100644 --- a/src/input/mpegts/mpegts_input.c +++ b/src/input/mpegts/mpegts_input.c @@ -847,12 +847,12 @@ mpegts_input_started_mux buf, (long)mono2sec(mclk()), mi); mmi->mmi_mux->mm_tsdebug_fd = tvh_open(path, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR); if (mmi->mmi_mux->mm_tsdebug_fd < 0) - tvherror("tsdebug", "unable to create file '%s' (%i)", path, errno); + tvherror(LS_TSDEBUG, "unable to create file '%s' (%i)", path, errno); snprintf(path, sizeof(path), "%s/%s-%li-%p-input.ts", tvheadend_tsdebug, buf, (long)mono2sec(mclk()), mi); mmi->mmi_mux->mm_tsdebug_fd2 = tvh_open(path, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR); if (mmi->mmi_mux->mm_tsdebug_fd2 < 0) - tvherror("tsdebug", "unable to create file '%s' (%i)", path, errno); + tvherror(LS_TSDEBUG, "unable to create file '%s' (%i)", path, errno); } else { mmi->mmi_mux->mm_tsdebug_fd = -1; mmi->mmi_mux->mm_tsdebug_fd2 = -1; diff --git a/src/tvhlog.c b/src/tvhlog.c index eb3d545e6..24f0e8eec 100644 --- a/src/tvhlog.c +++ b/src/tvhlog.c @@ -163,6 +163,7 @@ tvhlog_subsys_t tvhlog_subsystems[] = { [LS_TIMESHIFT] = { "timeshift", N_("Timeshift") }, [LS_SCANFILE] = { "scanfile", N_("Scanfile") }, [LS_TSFILE] = { "tsfile", N_("MPEG-TS File") }, + [LS_TSDEBUG] = { "tsdebug", N_("MPEG-TS Input Debug") }, }; static void diff --git a/src/tvhlog.h b/src/tvhlog.h index f41c2c02b..d4b277fea 100644 --- a/src/tvhlog.h +++ b/src/tvhlog.h @@ -187,6 +187,7 @@ enum { LS_TIMESHIFT, LS_SCANFILE, LS_TSFILE, + LS_TSDEBUG, LS_LAST /* keep this last */ };