From: Jaroslav Kysela Date: Fri, 30 Oct 2015 18:42:02 +0000 (+0100) Subject: DVR: Fix the start conditions and do early stop properly, fixes #3228 X-Git-Tag: v4.2.1~1723 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2cab5776d37656278fdaf47f0a249a0af576db9f;p=thirdparty%2Ftvheadend.git DVR: Fix the start conditions and do early stop properly, fixes #3228 --- diff --git a/src/dvr/dvr_db.c b/src/dvr/dvr_db.c index 685d5ac6c..06129a72b 100644 --- a/src/dvr/dvr_db.c +++ b/src/dvr/dvr_db.c @@ -1585,10 +1585,10 @@ void dvr_event_running(epg_broadcast_t *e, epg_source_t esrc, int running) epg_broadcast_get_title(e, NULL), channel_get_name(e->channel)); de->de_running_stop = dispatch_clock; - if (de->de_sched_state == DVR_RECORDING) { + if (de->de_sched_state == DVR_RECORDING && de->de_running_start) { if (dvr_entry_get_stop_time(de) > dispatch_clock) { de->de_dont_reschedule = 1; - dvr_entry_set_timer(de); + dvr_stop_recording(de, SM_CODE_OK, 0, 0); tvhdebug("dvr", "dvr entry %s event %s on %s - EPG stop", idnode_uuid_as_sstr(&de->de_id), epg_broadcast_get_title(e, NULL), diff --git a/src/epggrab/module/eit.c b/src/epggrab/module/eit.c index 3314c9cc4..2d0c2fc38 100644 --- a/src/epggrab/module/eit.c +++ b/src/epggrab/module/eit.c @@ -550,6 +550,8 @@ static int _eit_process_event_one /* use running flag only for current broadcast */ if (running && tableid == 0x4e && sect == 0) epg_broadcast_notify_running(ebc, EPG_SOURCE_EIT, running == 4); + if (running && running != 4 && tableid == 0x4e && sect == 1) + epg_broadcast_notify_running(ebc, EPG_SOURCE_EIT, 0); return 0; }