Skip to content

Commit 1a3ca88

Browse files
DeltaMikeCharlieFlole998
authored andcommitted
Fix recording thread freeze when unable to create unique file name.
1 parent 26a14aa commit 1a3ca88

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

‎src/dvr/dvr_rec.c‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1749,7 +1749,11 @@ dvr_thread(void *aux)
17491749

17501750
if (muxing == 0) {
17511751
if (!dvr_thread_rec_start(&de, ss, &run, &started, &dts_offset, postproc))
1752+
{
1753+
tvherror(LS_DVR, "Recording thread failed to start. (SMT_PACKET)");
1754+
run = 0;
17521755
break;
1756+
}
17531757
tvhtrace(LS_DVR, "%s - muxing activated", idnode_uuid_as_str(&de->de_id, ubuf));
17541758
}
17551759

@@ -1818,7 +1822,11 @@ dvr_thread(void *aux)
18181822

18191823
if (muxing == 0) {
18201824
if (!dvr_thread_rec_start(&de, ss, &run, &started, &dts_offset, postproc))
1825+
{
1826+
tvherror(LS_DVR, "Recording thread failed to start. (SMT_MPEGTS)");
1827+
run = 0;
18211828
break;
1829+
}
18221830
tvhtrace(LS_DVR, "%s - muxing activated", idnode_uuid_as_str(&de->de_id, ubuf));
18231831
}
18241832

@@ -1924,11 +1932,12 @@ dvr_thread(void *aux)
19241932
case SMT_EXIT:
19251933
run = 0;
19261934
break;
1927-
}
1935+
}//END of switch statement
19281936

19291937
streaming_msg_free(sm);
19301938
tvh_mutex_lock(&sq->sq_mutex);
1931-
}
1939+
}//END of while loop
1940+
19321941
tvh_mutex_unlock(&sq->sq_mutex);
19331942

19341943
streaming_queue_clear(&backlog);

0 commit comments

Comments
 (0)