From bf2c5c581c833db1519e2fbfb884d9b88e503167 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Wed, 27 May 2015 14:34:31 +0200 Subject: [PATCH] mpegts: input - check the running flag in the global lock, too Conflicts: src/input/mpegts/mpegts_input.c --- src/input/mpegts/mpegts_input.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/input/mpegts/mpegts_input.c b/src/input/mpegts/mpegts_input.c index 44cf39911..47e611bbb 100644 --- a/src/input/mpegts/mpegts_input.c +++ b/src/input/mpegts/mpegts_input.c @@ -1323,8 +1323,10 @@ mpegts_input_table_thread ( void *aux ) /* Process */ pthread_mutex_lock(&global_lock); - if (mtf->mtf_mux && mtf->mtf_mux->mm_active) - mpegts_input_table_dispatch(mtf->mtf_mux, mtf->mtf_tsb, mtf->mtf_len); + if (mi->mi_running) { + if (mtf->mtf_mux && mtf->mtf_mux->mm_active) + mpegts_input_table_dispatch(mtf->mtf_mux, mtf->mtf_tsb, mtf->mtf_len); + } pthread_mutex_unlock(&global_lock); /* Cleanup */ -- 2.47.3