]> 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:28 +0000 (14:42 +0200)
src/input/mpegts/mpegts_input.c

index e68d7c31e7f1446c99ee579f363f2eccb0dc113a..db467283a5de5dd9c552fdff61be5f3408a1abdd 100644 (file)
@@ -628,6 +628,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;