Skip to content

Commit

Permalink
fix bug introduced in 8ad3fd6
Browse files Browse the repository at this point in the history
The EITs were printed too often due to a mix up between EIT schedules and p/f.
  • Loading branch information
cmassiot committed Dec 28, 2016
1 parent 45f60d4 commit 161bc13
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions demux.c
Expand Up @@ -3001,6 +3001,9 @@ static void HandleEIT( uint16_t i_pid, uint8_t *p_eit, mtime_t i_dts )
return;
}

if ( i_table_id != EIT_TABLE_ID_PF_ACTUAL )
goto out_eit;

/* We do not use psi_table_* primitives as the spec allows for holes in
* section numbering, and there is no sure way to know whether you have
* gathered all sections. */
Expand All @@ -3016,16 +3019,13 @@ static void HandleEIT( uint16_t i_pid, uint8_t *p_eit, mtime_t i_dts )
free(p_sid->pp_eit_sections[i_section]);
p_sid->pp_eit_sections[i_section] = p_eit;

if ( i_table_id == EIT_TABLE_ID_PF_ACTUAL )
eit_print( p_eit, msg_Dbg, NULL, demux_Iconv, NULL, PRINT_TEXT );
if ( b_print_enabled )
{
eit_print( p_eit, msg_Dbg, NULL, demux_Iconv, NULL, PRINT_TEXT );
if ( b_print_enabled )
{
eit_print( p_eit, demux_Print, NULL,
demux_Iconv, NULL, i_print_type );
if ( i_print_type == PRINT_XML )
fprintf(print_fh, "\n");
}
eit_print( p_eit, demux_Print, NULL,
demux_Iconv, NULL, i_print_type );
if ( i_print_type == PRINT_XML )
fprintf(print_fh, "\n");
}

out_eit:
Expand Down

0 comments on commit 161bc13

Please sign in to comment.