From 9e6331dba840930afdbe88e0aa605158c7f4095b Mon Sep 17 00:00:00 2001 From: loreg Date: Tue, 12 May 2009 15:44:44 +0000 Subject: [PATCH] Improve the continuity_counter.txt file. Now the warning messages '[Duplicate error]' and '[Discontinuity]' are printed in the file for any error found in the PID and not only for the first one. I have also removed some comments left over from previous a previous commit. --HG-- extra : convert_revision : svn%3Aeff31bef-be4a-0410-a8fe-e47997df2690/trunk%40144 --- tsreport.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tsreport.c b/tsreport.c index 387934e..02f28c7 100644 --- a/tsreport.c +++ b/tsreport.c @@ -234,7 +234,7 @@ static int report_buffering_stats(TS_reader_p tsreader, if (continuity_cnt_pid != INVALID_PID) { - file_cnt = fopen("continuity_counter.txt","w"); //lorenzo + file_cnt = fopen("continuity_counter.txt","w"); if (file_cnt == NULL) { print_err("### tsreport: Unable to open file continuity_counter.txt\n"); @@ -377,10 +377,10 @@ static int report_buffering_stats(TS_reader_p tsreader, { if (stats[index].cc_dup_count++ != 0) { + if (continuity_cnt_pid == pid) + fprintf(file_cnt, "[Duplicate error] "); if (stats[index].err_cc_dup_error++ == 0) { - if (continuity_cnt_pid == pid) - fprintf(file_cnt, "[Duplicate error] "); fprint_msg("### PID(%d): Continuity Counter >1 duplicate %d at " OFFSET_T_FORMAT "\n", stats[index].pid, cc, posn); } @@ -392,10 +392,10 @@ static int report_buffering_stats(TS_reader_p tsreader, stats[index].cc_dup_count = 0; if (((stats[index].last_cc + 1) & 15) != cc) { + if (continuity_cnt_pid == pid) + fprintf(file_cnt, "[Discontinuity] "); if (stats[index].err_cc_error++ == 0) { - if (continuity_cnt_pid == pid) - fprintf(file_cnt, "[Discontinuity] "); fprint_msg("### PID(%d): Continuity Counter discontinuity %d->%d at " OFFSET_T_FORMAT "\n", stats[index].pid, stats[index].last_cc, cc, posn); } @@ -579,7 +579,7 @@ static int report_buffering_stats(TS_reader_p tsreader, if (continuity_cnt_pid != INVALID_PID) { fprintf(file_cnt, "\n"); - fclose(file_cnt); //lorenzo + fclose(file_cnt); } if (!quiet)