From: DeltaMikeCharlie <127641886+DeltaMikeCharlie@users.noreply.github.com> Date: Sat, 24 May 2025 23:26:33 +0000 (+1000) Subject: Fix recording thread freeze when unable to create unique file name. X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=1a3ca885a4706b57cb9326663955176f72804376;p=thirdparty%2Ftvheadend.git Fix recording thread freeze when unable to create unique file name. --- diff --git a/src/dvr/dvr_rec.c b/src/dvr/dvr_rec.c index 278fa1dea..f9f971be7 100644 --- a/src/dvr/dvr_rec.c +++ b/src/dvr/dvr_rec.c @@ -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);