summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaylor Ralph <tralph@mythtv.org>2011-02-11 15:18:34 (GMT)
committer Taylor Ralph <tralph@mythtv.org>2011-02-11 15:18:34 (GMT)
commit4e815b0aa049f99caa1a6b5d78b481d314f130cc (patch)
tree46834a546b6c121fabbc6b31d75f45f22343a560
parente280511e551fff9ef05af939ce0d5f33cb56778c (diff)
Fix duration/position information for MHEG and audio only playback.
Refs #9570.
-rw-r--r--mythtv/libs/libmythtv/mythplayer.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/mythtv/libs/libmythtv/mythplayer.cpp b/mythtv/libs/libmythtv/mythplayer.cpp
index 0d72165..a13e7e5 100644
--- a/mythtv/libs/libmythtv/mythplayer.cpp
+++ b/mythtv/libs/libmythtv/mythplayer.cpp
@@ -4340,7 +4340,10 @@ void MythPlayer::calcSliderPos(osdInfo &info, bool paddedFields)
info.values.insert("progbefore", 0);
info.values.insert("progafter", 0);
- int playbackLen = (totalDuration > 0) ? totalDuration : totalLength;
+ int playbackLen = totalDuration;
+
+ if (totalDuration == 0 || interactiveTV || noVideoTracks)
+ playbackLen = totalLength;
if (livetv && player_ctx->tvchain)
{
@@ -4358,7 +4361,10 @@ void MythPlayer::calcSliderPos(osdInfo &info, bool paddedFields)
islive = true;
}
- float secsplayed = (float)(disp_timecode / 1000.f);
+ float secsplayed = (interactiveTV || noVideoTracks) ?
+ (float)(framesPlayed / video_frame_rate) :
+ (float)(disp_timecode / 1000.f);
+
calcSliderPosPriv(info, paddedFields, playbackLen, secsplayed, islive);
}