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:26:30 (GMT)
commit0ddc3f2678a052d216ed76bc52b34e4ea7f7ac10 (patch)
tree80f721ec3879007d21495d1714c9114ee2bb532e
parentdcc9b96c4680820576c3d7979ecba222dbdc3730 (diff)
Fix duration/position information for MHEG and audio only playback.
Refs #9570.
-rw-r--r--mythtv/libs/libmythtv/mythplayer.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/mythtv/libs/libmythtv/mythplayer.cpp b/mythtv/libs/libmythtv/mythplayer.cpp
index b390c28..8cdd2e8 100644
--- a/mythtv/libs/libmythtv/mythplayer.cpp
+++ b/mythtv/libs/libmythtv/mythplayer.cpp
@@ -4240,8 +4240,11 @@ 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)
{
info.values["progbefore"] = (int)player_ctx->tvchain->HasPrev();
@@ -4258,7 +4261,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);
}