Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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.
  • Loading branch information...
commit 80192ec90d0c8937c642f41a11c5316830472545 1 parent 83bc1fa
@tralph tralph authored
Showing with 2 additions and 7 deletions.
  1. +2 −7 mythtv/libs/libmythtv/mythplayer.cpp
View
9 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);
}
Please sign in to comment.
Something went wrong with that request. Please try again.