make sure the recording has been started correctly before atempting to write packets to the muxer.

This commit is contained in:
John Törnblom 2012-11-17 15:31:07 +01:00
parent 442d695445
commit 34ff0c20db

View file

@ -448,7 +448,8 @@ dvr_thread(void *aux)
switch(sm->sm_type) {
case SMT_MPEGTS:
case SMT_PACKET:
if(dispatch_clock > de->de_start - (60 * de->de_start_extra)) {
if(started &&
dispatch_clock > de->de_start - (60 * de->de_start_extra)) {
dvr_rec_set_state(de, DVR_RS_RUNNING, 0);
muxer_write_pkt(de->de_mux, sm->sm_type, sm->sm_data);