From: Jaroslav Kysela Date: Fri, 12 Oct 2018 12:42:21 +0000 (+0200) Subject: mpegts input: clear correctly mux's last pid cache in mpegts_input_close_pid() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cae80475f6ee70928c200ef9e37534dd126b0d39;p=thirdparty%2Ftvheadend.git mpegts input: clear correctly mux's last pid cache in mpegts_input_close_pid() --- diff --git a/src/input/mpegts/mpegts_input.c b/src/input/mpegts/mpegts_input.c index aef0e2afd..ddfc5257f 100644 --- a/src/input/mpegts/mpegts_input.c +++ b/src/input/mpegts/mpegts_input.c @@ -612,6 +612,10 @@ mpegts_input_close_pid } } if (!RB_FIRST(&mp->mp_subs)) { + if (mm->mm_last_pid == mp->mp_pid) { + mm->mm_last_pid = -1; + mm->mm_last_mp = NULL; + } RB_REMOVE(&mm->mm_pids, mp, mp_link); free(mp); return 1;