]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
mpegts input: clear correctly mux's last pid cache in mpegts_input_close_pid()
authorJaroslav Kysela <perex@perex.cz>
Fri, 12 Oct 2018 12:42:21 +0000 (14:42 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 12 Oct 2018 12:42:21 +0000 (14:42 +0200)
src/input/mpegts/mpegts_input.c

index aef0e2afd4153622537f3253595510e23d591eaa..ddfc5257fa1d6ac0acee87ff64c59fdf6e497b93 100644 (file)
@@ -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;