From cae80475f6ee70928c200ef9e37534dd126b0d39 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Fri, 12 Oct 2018 14:42:21 +0200 Subject: [PATCH] mpegts input: clear correctly mux's last pid cache in mpegts_input_close_pid() --- src/input/mpegts/mpegts_input.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.47.3