summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUser <mythtv@kosowsky.org>2011-11-29 19:41:30 (GMT)
committer Gavin Hurlbut <ghurlbut@mythtv.org>2011-11-29 19:41:30 (GMT)
commitc4ee599818c8cfd6f8e9b69df3011ca527d39295 (patch)
tree4d49c93d1db285a844c3a82939663e2d4e275edd
parentf5fd11fa54141cab0239f15947faa3a41a2e9cef (diff)
Catch first frame corrupting unsigned count
Fixes #9801 Signed-off-by: Gavin Hurlbut <ghurlbut@mythtv.org>
-rw-r--r--mythtv/libs/libmythtv/nuppeldecoder.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/mythtv/libs/libmythtv/nuppeldecoder.cpp b/mythtv/libs/libmythtv/nuppeldecoder.cpp
index d75661e..52e68a3 100644
--- a/mythtv/libs/libmythtv/nuppeldecoder.cpp
+++ b/mythtv/libs/libmythtv/nuppeldecoder.cpp
@@ -1124,7 +1124,8 @@ bool NuppelDecoder::GetFrame(DecodeType decodetype)
else if (frameheader.comptype == 'V')
{
lastKey = frameheader.timecode;
- framesPlayed = frameheader.timecode - 1;
+ framesPlayed = (frameheader.timecode > 0 ?
+ frameheader.timecode - 1 : 0);
if (!hasFullPositionMap)
{