Skip to content

Commit 0e65f56

Browse files
committed
ts_display_nit type parameter
1 parent 4c693da commit 0e65f56

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/rewrite_nit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ void rewrite_nit_section(unsigned char *full_nit_section)
228228
nit->section_length_hi = (new_section_length >> 8) & 0x0f;
229229
nit->section_length_lo = new_section_length & 0xff;
230230

231-
ts_display_nit(log_module, (unsigned char *)nit);
231+
ts_display_nit(log_module, MSG_INFO, (unsigned char *)nit);
232232

233233
setCRC32(full_nit_section);
234234
}

src/ts.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -677,11 +677,11 @@ void ts_display_pat(char* log_module,unsigned char *buf)
677677
* @param buf The buffer containing the NIT
678678
* @attention not the whole NIT is printed (network descriptors) because of the amount of some descriptors
679679
*/
680-
void ts_display_nit(char *mod_log_module, unsigned char *buf)
680+
void ts_display_nit(char *mod_log_module, int type, unsigned char *buf)
681681
{
682682
nit_t *nit = (nit_t*)(buf);
683-
log_message( mod_log_module, MSG_FLOOD,"-------------- Display NIT ----------------");
684-
log_message( mod_log_module, MSG_FLOOD, "network id 0x%04x section_length %d version %i "
683+
log_message( mod_log_module, type,"-------------- Display NIT ----------------");
684+
log_message( mod_log_module, type, "network id 0x%04x section_length %d version %i "
685685
"section_number %d last_section_number %d current_next_indicator %d",
686686
HILO(nit->network_id),
687687
HILO(nit->section_length),
@@ -691,27 +691,27 @@ void ts_display_nit(char *mod_log_module, unsigned char *buf)
691691
nit->current_next_indicator);
692692

693693
if(nit->current_next_indicator == 0) {
694-
log_message( mod_log_module, MSG_FLOOD,"The current_next_indicator is set to 0, "
694+
log_message( mod_log_module, type,"The current_next_indicator is set to 0, "
695695
"this NIT is not valid for the current stream");
696696
}
697697

698698

699699
// network descriptors
700-
log_message(mod_log_module, MSG_FLOOD, "network descriptor length: %d",
700+
log_message(mod_log_module, type, "network descriptor length: %d",
701701
HILO(nit->network_descriptor_length));
702702

703703
nit_mid_t *nit_mid = (nit_mid_t *)((unsigned char *)nit + NIT_LEN + HILO(nit->network_descriptor_length));
704704

705705
// transport descriptors
706-
log_message(mod_log_module, MSG_FLOOD, "transport stream loop length: %d",
706+
log_message(mod_log_module, type, "transport stream loop length: %d",
707707
HILO(nit_mid->transport_stream_loop_length));
708708
char * tab_log_module = calloc(1, strlen(mod_log_module) + 2 + 1);
709709
strcpy(tab_log_module, mod_log_module);
710710
strcat(tab_log_module, "\t");
711711
ts_display_nit_transport_stream_loop(tab_log_module, (unsigned char *)nit_mid + SIZE_NIT_MID,
712712
HILO(nit_mid->transport_stream_loop_length));
713713

714-
log_message( mod_log_module, MSG_FLOOD,"-------------- NIT Displayed ----------------");
714+
log_message( mod_log_module, type,"-------------- NIT Displayed ----------------");
715715
}
716716

717717

src/ts.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ struct mumudvb_channel_t;
900900
void ts_display_pat(char* log_module,unsigned char *buf);
901901
void ts_display_country_avaibility_descriptor(char* log_module,unsigned char *buf);
902902

903-
void ts_display_nit(char* mod_log_module,unsigned char *buf);
903+
void ts_display_nit(char* mod_log_module,int type, unsigned char *buf);
904904
void ts_display_nit_network_descriptors(char *log_module, unsigned char *buf,int descriptors_loop_len);
905905
void ts_display_network_name_descriptor(char* log_module, unsigned char *buf);
906906
void ts_display_multilingual_network_name_descriptor(char* log_module, unsigned char *buf);

0 commit comments

Comments
 (0)