Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mpegts table dispatch: added back the assert to see the bug
  • Loading branch information
perexg committed Jul 13, 2014
1 parent dcbf2cf commit 8b22c3f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/input/mpegts/mpegts_input.c
Expand Up @@ -542,7 +542,7 @@ mpegts_input_recv_packets
static void
mpegts_input_table_dispatch ( mpegts_mux_t *mm, const uint8_t *tsb )
{
int i, len = 0;
int i, len = 0, c = 0;
uint16_t pid = ((tsb[1] & 0x1f) << 8) | tsb[2];
uint8_t cc = (tsb[3] & 0x0f);
mpegts_table_t *mt, **vec;
Expand All @@ -552,13 +552,18 @@ mpegts_input_table_dispatch ( mpegts_mux_t *mm, const uint8_t *tsb )
i = mm->mm_num_tables;
vec = alloca(i * sizeof(mpegts_table_t *));
LIST_FOREACH(mt, &mm->mm_tables, mt_link) {
c++;
if (mt->mt_destroyed || !mt->mt_subscribed)
continue;
mpegts_table_grab(mt);
if (len < i)
vec[len++] = mt;
}
pthread_mutex_unlock(&mm->mm_tables_lock);
if (i != c) {
tvherror("psi", "tables count inconsistency (num %d, list %d)", i, c);
assert(0);
}

/* Process */
for (i = 0; i < len; i++) {
Expand Down

0 comments on commit 8b22c3f

Please sign in to comment.