summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Kendall <mkendall@mythtv.org>2011-03-14 11:24:07 (GMT)
committer Mark Kendall <mkendall@mythtv.org>2011-03-14 11:24:07 (GMT)
commit785ea1b3604f44c05f0f353a5c0edba0b06592d9 (patch)
treef485a6ecd8c4145ba7807de11b0fdcaf60dba6f4
parent40fc4546aee84c8efd2c1e0af837c934cb376512 (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 d7e4e24..2052228 100644
--- a/mythtv/libs/libmythtv/mythplayer.cpp
+++ b/mythtv/libs/libmythtv/mythplayer.cpp
@@ -2222,7 +2222,8 @@ void MythPlayer::SwitchToProgram(void)
if (discontinuity || newtype)
{
player_ctx->tvchain->SetProgram(*pginfo);
- decoder->SetProgramInfo(*pginfo);
+ if (decoder)
+ decoder->SetProgramInfo(*pginfo);
player_ctx->buffer->Reset(true);
if (newtype)
@@ -3146,7 +3147,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);
}
@@ -4243,6 +4245,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;