From 6bc4e46192efeddeb73624b1f342ad8c890c6743 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 7 Jul 2016 18:34:26 +0200 Subject: [PATCH] MPEG TS: remove continuity counter handling It was not really acted upon. Only a debugging message would be output on continuity errors. --- src/input/r_mpeg_ts.cpp | 14 -------------- src/input/r_mpeg_ts.h | 2 -- 2 files changed, 16 deletions(-) diff --git a/src/input/r_mpeg_ts.cpp b/src/input/r_mpeg_ts.cpp index d526466a3..89b4d4f0e 100644 --- a/src/input/r_mpeg_ts.cpp +++ b/src/input/r_mpeg_ts.cpp @@ -1240,18 +1240,6 @@ mpeg_ts_reader_c::parse_packet(unsigned char *buf) { return false; else { - // Check continuity counter - if (!adf_discontinuity_indicator) { - track->continuity_counter++; - track->continuity_counter %= 16; - if (hdr->get_continuity_counter() != track->continuity_counter) { - mxdebug_if(m_debug_packet, boost::format("mpeg_ts_reader_c::parse_packet: Continuity error on PID: %1%. Continue anyway...\n") % table_pid); - track->continuity_counter = hdr->get_continuity_counter(); - } - - } else - track->continuity_counter = hdr->get_continuity_counter(); - // If PES payload size known, prevent to copy more TS payload than actually needed if ( (track->pes_payload_size != 0) && (track->pes_payload_size < static_cast(ts_payload_size + track->pes_payload->get_size()))) @@ -1439,8 +1427,6 @@ mpeg_ts_reader_c::parse_start_unit_packet(mpeg_ts_track_ptr &track, } } - track->continuity_counter = ts_packet_header->get_continuity_counter(); - if ( (track->pes_payload_size != 0) && (track->pes_payload_size < static_cast(ts_payload_size + track->pes_payload->get_size()))) ts_payload_size = track->pes_payload_size - track->pes_payload->get_size(); diff --git a/src/input/r_mpeg_ts.h b/src/input/r_mpeg_ts.h index 3c830f024..cc2e7cc65 100644 --- a/src/input/r_mpeg_ts.h +++ b/src/input/r_mpeg_ts.h @@ -282,7 +282,6 @@ public: bool data_ready; int pes_payload_size; // size of the current PID payload in bytes byte_buffer_cptr pes_payload; // buffer with the current PID payload - unsigned char continuity_counter; // check for PID continuity bool probed_ok; int ptzr; // the actual packetizer instance @@ -329,7 +328,6 @@ public: , data_ready(false) , pes_payload_size(0) , pes_payload(new byte_buffer_c) - , continuity_counter(0) , probed_ok(false) , ptzr(-1) , m_timestamp_wrap_add{timestamp_c::ns(0)}