Browse files

Cleanup some useless "discontinuity detected" messages following 87a15e1



Closes #11328
(cherry picked from commit efc1e46)

Signed-off-by: Taylor Ralph <tralph@mythtv.org>
  • Loading branch information...
1 parent 71ad653 commit 5f5e5f70b16f3733764a70c4767c2d4ebdd3a915 @jpoet jpoet committed with tralph Mar 2, 2013
Showing with 11 additions and 11 deletions.
  1. +11 −11 mythtv/libs/libmythtv/dtvrecorder.cpp
View
22 mythtv/libs/libmythtv/dtvrecorder.cpp
@@ -520,7 +520,8 @@ bool DTVRecorder::FindMPEG2Keyframes(const TSPacket* tspacket)
hasKeyFrame &= (_last_seq_seen + maxKFD) < _frames_seen_count;
}
- if (hasKeyFrame)
+ // _buffer_packets will only be true if a payload start has been seen
+ if (hasKeyFrame && _buffer_packets)
{
LOG(VB_RECORD, LOG_DEBUG, LOC + QString
("Keyframe @ %1 + %2 = %3")
@@ -884,7 +885,8 @@ bool DTVRecorder::FindH264Keyframes(const TSPacket *tspacket)
}
} // for (; i < TSPacket::kSize; ++i)
- if (hasKeyFrame)
+ // _buffer_packets will only be true if a payload start has been seen
+ if (hasKeyFrame && _buffer_packets)
{
LOG(VB_RECORD, LOG_DEBUG, LOC + QString
("Keyframe @ %1 + %2 = %3 AU %4")
@@ -1351,8 +1353,12 @@ bool DTVRecorder::ProcessAudioTSPacket(const TSPacket &tspacket)
bool DTVRecorder::ProcessAVTSPacket(const TSPacket &tspacket)
{
// Sync recording start to first keyframe
- if (!_buffer_packets && _wait_for_keyframe_option && _first_keyframe < 0)
+ if (_wait_for_keyframe_option && _first_keyframe < 0)
+ {
+ if (_buffer_packets)
+ BufferedWrite(tspacket);
return true;
+ }
const uint pid = tspacket.PID();
@@ -1371,17 +1377,11 @@ bool DTVRecorder::ProcessAVTSPacket(const TSPacket &tspacket)
.arg(erate,5,'f',2));
}
- // Sync streams to the first Payload Unit Start Indicator
- // _after_ first keyframe iff _wait_for_keyframe_option is true
- if (!(_pid_status[pid] & kPayloadStartSeen) && tspacket.HasPayload())
+ if (!(_pid_status[pid] & kPayloadStartSeen))
{
- if (!tspacket.PayloadStart())
- return true; // not payload start - drop packet
-
+ _pid_status[pid] |= kPayloadStartSeen;
LOG(VB_RECORD, LOG_INFO, LOC +
QString("PID 0x%1 Found Payload Start").arg(pid,0,16));
-
- _pid_status[pid] |= kPayloadStartSeen;
}
BufferedWrite(tspacket);

0 comments on commit 5f5e5f7

Please sign in to comment.