summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaylor Ralph <tralph@mythtv.org>2011-03-29 01:24:55 (GMT)
committer Taylor Ralph <tralph@mythtv.org>2011-03-29 01:24:55 (GMT)
commit80192ec90d0c8937c642f41a11c5316830472545 (patch)
tree1668f96b9e1e5b66d3579790411a854d9f5e268d
parent83bc1fa51a099be93d38dc7d2a51bd050decdb4d (diff)
mythplayer: Revert back to the old method used for duration/position in the OSD slider.
This has proven to be problematic given that many encoders produce bad timestamps or reset the timestamp (timestamp discontinuities) yielding this method insufficient. In trunk Gavin has added the ability for commflag to generate and store the duration. Using the commflag duration will allow accurate duration/position for broken videos. Refs #9109.
-rw-r--r--mythtv/libs/libmythtv/mythplayer.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/mythtv/libs/libmythtv/mythplayer.cpp b/mythtv/libs/libmythtv/mythplayer.cpp
index 472719e..c1130f0 100644
--- a/mythtv/libs/libmythtv/mythplayer.cpp
+++ b/mythtv/libs/libmythtv/mythplayer.cpp
@@ -4264,10 +4264,7 @@ void MythPlayer::calcSliderPos(osdInfo &info, bool paddedFields)
info.values.insert("progbefore", 0);
info.values.insert("progafter", 0);
- int playbackLen = totalDuration;
-
- if (totalDuration == 0 || noVideoTracks || decoder->GetCodecDecoderName() == "nuppel")
- playbackLen = totalLength;
+ int playbackLen = totalLength;
if (livetv && player_ctx->tvchain)
{
@@ -4285,9 +4282,7 @@ void MythPlayer::calcSliderPos(osdInfo &info, bool paddedFields)
islive = true;
}
- float secsplayed = (noVideoTracks || decoder->GetCodecDecoderName() == "nuppel") ?
- (float)(framesPlayed / video_frame_rate) :
- (float)(disp_timecode / 1000.f);
+ float secsplayed = (float)(framesPlayed / video_frame_rate);
calcSliderPosPriv(info, paddedFields, playbackLen, secsplayed, islive);
}