Skip to content

Commit

Permalink
Fix duration/position information for MHEG and audio only playback.
Browse files Browse the repository at this point in the history
Refs #9570.
  • Loading branch information
tralph committed Feb 11, 2011
1 parent e280511 commit 4e815b0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mythtv/libs/libmythtv/mythplayer.cpp
Expand Up @@ -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)
{
Expand All @@ -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);
}

Expand Down

0 comments on commit 4e815b0

Please sign in to comment.