]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
timeshift: fix the locking bug introduced by the last commit, simplify code
authorJaroslav Kysela <perex@perex.cz>
Mon, 9 Jan 2017 19:36:20 +0000 (20:36 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 9 Jan 2017 19:36:20 +0000 (20:36 +0100)
src/timeshift/timeshift_writer.c

index 24fb458f8b6bb28d4daf3d3edce4231a926a593f..102835e32ca115afde013e11d3a0f8390eddcb1d 100644 (file)
@@ -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;