Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mpegts: input - check the running flag in the global lock, too
  • Loading branch information
perexg committed May 27, 2015
1 parent 718d81d commit e56ca89
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/input/mpegts/mpegts_input.c
Expand Up @@ -1329,13 +1329,15 @@ mpegts_input_table_thread ( void *aux )

/* Process */
pthread_mutex_lock(&global_lock);
if (mm != mtf->mtf_mux) {
mm = mtf->mtf_mux;
if (mm)
mpegts_mux_nice_name(mm, muxname, sizeof(muxname));
if (mi->mi_running) {
if (mm != mtf->mtf_mux) {
mm = mtf->mtf_mux;
if (mm)
mpegts_mux_nice_name(mm, muxname, sizeof(muxname));
}
if (mm && mm->mm_active)
mpegts_input_table_dispatch(mm, muxname, mtf->mtf_tsb, mtf->mtf_len);
}
if (mm && mm->mm_active)
mpegts_input_table_dispatch(mm, muxname, mtf->mtf_tsb, mtf->mtf_len);
pthread_mutex_unlock(&global_lock);

/* Cleanup */
Expand Down

0 comments on commit e56ca89

Please sign in to comment.