summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Kendall <mkendall@mythtv.org>2011-03-14 11:17:54 (GMT)
committer Mark Kendall <mkendall@mythtv.org>2011-03-14 11:17:54 (GMT)
commit96f2ed44755a31223be32d0a89c87ff3f22bd4f7 (patch)
tree952662a0484fbfb85c25b440fa6d3bc82e4f0df9
parentc411f55f7fa122bbb04d64278b207f4a43e3080a (diff)
MythPlayer:: Add some missing null pointer checks for the decoder.
-rw-r--r--mythtv/libs/libmythtv/mythplayer.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/mythtv/libs/libmythtv/mythplayer.cpp b/mythtv/libs/libmythtv/mythplayer.cpp
index a1220bf..728209f 100644
--- a/mythtv/libs/libmythtv/mythplayer.cpp
+++ b/mythtv/libs/libmythtv/mythplayer.cpp
@@ -2288,7 +2288,8 @@ void MythPlayer::SwitchToProgram(void)
.arg(newid).arg(GetEof()));
player_ctx->tvchain->SetProgram(*pginfo);
- decoder->SetProgramInfo(*pginfo);
+ if (decoder)
+ decoder->SetProgramInfo(*pginfo);
player_ctx->buffer->Reset(true);
if (OpenFile() < 0)
@@ -3179,7 +3180,8 @@ void MythPlayer::ChangeSpeed(void)
if (skip_changed && videoOutput)
{
videoOutput->SetPrebuffering(ffrew_skip == 1);
- decoder->setExactSeeks(exactseeks && ffrew_skip == 1);
+ if (decoder)
+ decoder->setExactSeeks(exactseeks && ffrew_skip == 1);
if (play_speed != 0.0f && !(last_speed == 0.0f && ffrew_skip == 1))
DoJumpToFrame(framesPlayed + fftime - rewindtime);
}
@@ -4298,6 +4300,9 @@ int MythPlayer::GetSecondsBehind(void) const
void MythPlayer::calcSliderPos(osdInfo &info, bool paddedFields)
{
+ if (!decoder)
+ return;
+
bool islive = false;
int chapter = GetCurrentChapter() + 1;
int title = GetCurrentTitle() + 1;