]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Fix recording thread freeze when unable to create unique file name.
authorDeltaMikeCharlie <127641886+DeltaMikeCharlie@users.noreply.github.com>
Sat, 24 May 2025 23:26:33 +0000 (09:26 +1000)
committerFlole <Flole998@users.noreply.github.com>
Sun, 25 May 2025 01:46:08 +0000 (03:46 +0200)
src/dvr/dvr_rec.c

index 278fa1dea7820ba7af6c1f74fa164380da03c9eb..f9f971be7cffccb089d99598558af48ebc8d5ec5 100644 (file)
@@ -1749,7 +1749,11 @@ dvr_thread(void *aux)
 
       if (muxing == 0) {
         if (!dvr_thread_rec_start(&de, ss, &run, &started, &dts_offset, postproc))
+        {
+          tvherror(LS_DVR, "Recording thread failed to start. (SMT_PACKET)");
+          run = 0;
           break;
+        }
         tvhtrace(LS_DVR, "%s - muxing activated", idnode_uuid_as_str(&de->de_id, ubuf));
       }
 
@@ -1818,7 +1822,11 @@ dvr_thread(void *aux)
 
       if (muxing == 0) {
         if (!dvr_thread_rec_start(&de, ss, &run, &started, &dts_offset, postproc))
+        {
+          tvherror(LS_DVR, "Recording thread failed to start. (SMT_MPEGTS)");
+          run = 0;
           break;
+        }
         tvhtrace(LS_DVR, "%s - muxing activated", idnode_uuid_as_str(&de->de_id, ubuf));
       }
 
@@ -1924,11 +1932,12 @@ fin:
     case SMT_EXIT:
       run = 0;
       break;
-    }
+    }//END of switch statement
 
     streaming_msg_free(sm);
     tvh_mutex_lock(&sq->sq_mutex);
-  }
+  }//END of while loop
+
   tvh_mutex_unlock(&sq->sq_mutex);
 
   streaming_queue_clear(&backlog);