Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix tsdebug, fixes #4006
  • Loading branch information
perexg committed Oct 3, 2016
1 parent c401705 commit 592bdb8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/input/mpegts.h
Expand Up @@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions src/input/mpegts/mpegts_input.c
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/tvhlog.c
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/tvhlog.h
Expand Up @@ -187,6 +187,7 @@ enum {
LS_TIMESHIFT,
LS_SCANFILE,
LS_TSFILE,
LS_TSDEBUG,
LS_LAST /* keep this last */
};

Expand Down

0 comments on commit 592bdb8

Please sign in to comment.