Permalink
Browse files

Fix duration/position information for MHEG and audio only playback.

Refs #9570.
  • Loading branch information...
1 parent e280511 commit 4e815b0aa049f99caa1a6b5d78b481d314f130cc @tralph tralph committed Feb 11, 2011
Showing with 8 additions and 2 deletions.
  1. +8 −2 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);
}

0 comments on commit 4e815b0

Please sign in to comment.