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:43:51 (GMT)
commit03cff208162704985d1dfe36f8a302da4f2b4251 (patch)
tree6820b730c8a86bebe7e56e808e319a4997a2a0b8
parent602123466efb85573902c7252a622cb10ce0d665 (diff)
Catch first frame corrupting unsigned count
Fixes #9801 Signed-off-by: Gavin Hurlbut <ghurlbut@mythtv.org> (cherry picked from commit c4ee599818c8cfd6f8e9b69df3011ca527d39295)
-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 ee5a127..3f5f74f 100644
--- a/mythtv/libs/libmythtv/nuppeldecoder.cpp
+++ b/mythtv/libs/libmythtv/nuppeldecoder.cpp
@@ -1129,7 +1129,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)
{