Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mpegts tables: add another mutex protection to fastswitch
  • Loading branch information
perexg committed Jul 12, 2014
1 parent e0ac876 commit 4d8aee6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/input/mpegts/mpegts_table.c
Expand Up @@ -30,11 +30,15 @@ mpegts_table_fastswitch ( mpegts_mux_t *mm )
if(mm->mm_scan_state != MM_SCAN_STATE_ACTIVE)
return;

pthread_mutex_lock(&mm->mm_tables_lock);
LIST_FOREACH(mt, &mm->mm_tables, mt_link) {
if (!(mt->mt_flags & MT_QUICKREQ)) continue;
if(!mt->mt_complete)
if(!mt->mt_complete) {
pthread_mutex_unlock(&mm->mm_tables_lock);
return;
}
}
pthread_mutex_unlock(&mm->mm_tables_lock);

mpegts_mux_nice_name(mm, buf, sizeof(buf));
tvhinfo("mpegts", "%s scan complete", buf);
Expand Down

0 comments on commit 4d8aee6

Please sign in to comment.