Skip to content
Browse files

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

Refs #9570.
  • Loading branch information...
1 parent dcc9b96 commit 0ddc3f2678a052d216ed76bc52b34e4ea7f7ac10 @tralph tralph committed
Showing with 9 additions and 3 deletions.
  1. +9 −3 mythtv/libs/libmythtv/mythplayer.cpp
View
12 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);
}

0 comments on commit 0ddc3f2

Please sign in to comment.
Something went wrong with that request. Please try again.