From: Jaroslav Kysela Date: Mon, 9 Jan 2017 19:36:20 +0000 (+0100) Subject: timeshift: fix the locking bug introduced by the last commit, simplify code X-Git-Tag: v4.2.1~132 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=489ba951501a569042850d6ea0e573a12ceffda7;p=thirdparty%2Ftvheadend.git timeshift: fix the locking bug introduced by the last commit, simplify code --- diff --git a/src/timeshift/timeshift_writer.c b/src/timeshift/timeshift_writer.c index 24fb458f8..102835e32 100644 --- a/src/timeshift/timeshift_writer.c +++ b/src/timeshift/timeshift_writer.c @@ -369,9 +369,8 @@ static void _process_msg } if (sm->sm_type == SMT_START) _update_smt_start(ts, (streaming_start_t *)sm->sm_data); - if (ts->dobuf) { - if (teletext) /* do not save teletext packets */ - goto end; + /* do buffering, but without teletext packets */ + if (ts->dobuf && !teletext) { if ((tsf = timeshift_filemgr_get(ts, sm->sm_time)) != NULL) { if (tsf->wfd >= 0 || tsf->ram) { if ((err = _process_msg0(ts, tsf, sm)) < 0) { @@ -390,7 +389,6 @@ static void _process_msg } /* Next */ -end: streaming_msg_free(sm); return;