diff --git a/mythtv/libs/libmythtv/mythplayer.cpp b/mythtv/libs/libmythtv/mythplayer.cpp index 198e1facbb5..c0de97a3f93 100644 --- a/mythtv/libs/libmythtv/mythplayer.cpp +++ b/mythtv/libs/libmythtv/mythplayer.cpp @@ -544,15 +544,13 @@ bool MythPlayer::InitVideo(void) decoder->GetVideoCodecPrivate(), pipState, video_disp_dim, video_aspect, - widget->winId(), display_rect, (video_frame_rate * play_speed), + widget->winId(), display_rect, video_frame_rate, 0 /*embedid*/); } if (videoOutput) { videoOutput->SetVideoScalingAllowed(true); - // We need to tell it this for automatic deinterlacer settings - videoOutput->SetVideoFrameRate(video_frame_rate * play_speed); CheckExtraAudioDecode(); } } @@ -649,6 +647,8 @@ void MythPlayer::ReinitVideo(void) QMutexLocker locker1(&osdLock); QMutexLocker locker2(&vidExitLock); QMutexLocker locker3(&videofiltersLock); + + videoOutput->SetVideoFrameRate(video_frame_rate); float aspect = (forced_video_aspect > 0) ? forced_video_aspect : video_aspect; if (!videoOutput->InputChanged(video_disp_dim, aspect, @@ -662,8 +662,6 @@ void MythPlayer::ReinitVideo(void) return; } - // We need to tell it this for automatic deinterlacer settings - videoOutput->SetVideoFrameRate(video_frame_rate * play_speed); if (osd) osd->SetPainter(videoOutput->GetOSDPainter()); ReinitOSD(); @@ -3180,7 +3178,7 @@ void MythPlayer::ChangeSpeed(void) if (videoOutput && videosync) { // We need to tell it this for automatic deinterlacer settings - videoOutput->SetVideoFrameRate(video_frame_rate * play_speed); + videoOutput->SetVideoFrameRate(video_frame_rate); // If using bob deinterlace, turn on or off if we // changed to or from synchronous playback speed. diff --git a/mythtv/libs/libmythtv/videodisplayprofile.h b/mythtv/libs/libmythtv/videodisplayprofile.h index a3b4ced9a66..39074d590d5 100644 --- a/mythtv/libs/libmythtv/videodisplayprofile.h +++ b/mythtv/libs/libmythtv/videodisplayprofile.h @@ -85,6 +85,7 @@ class MPUBLIC VideoDisplayProfile void SetInput(const QSize &size); void SetOutput(float framerate); + float GetOutput(void) { return last_rate; } void SetVideoRenderer(const QString &video_renderer); bool CheckVideoRendererGroup(const QString renderer); diff --git a/mythtv/libs/libmythtv/videooutbase.cpp b/mythtv/libs/libmythtv/videooutbase.cpp index 4119fb5a1f2..e143beed739 100644 --- a/mythtv/libs/libmythtv/videooutbase.cpp +++ b/mythtv/libs/libmythtv/videooutbase.cpp @@ -213,7 +213,7 @@ VideoOutput *VideoOutput::Create( if (vo) { vo->SetPIPState(pipState); - vo->video_prate = video_prate; + vo->SetVideoFrameRate(video_prate); if (vo->Init( video_dim.width(), video_dim.height(), video_aspect, win_id, display_rect.x(), display_rect.y(), @@ -313,8 +313,7 @@ VideoOutput::VideoOutput() : db_deint_filtername(QString::null), // Video parameters - video_codec_id(kCodec_NONE), - db_vdisp_profile(NULL), video_prate(0.0), + video_codec_id(kCodec_NONE), db_vdisp_profile(NULL), // Picture-in-Picture stuff pip_desired_display_size(160,128), pip_display_size(0,0), @@ -450,7 +449,6 @@ bool VideoOutput::IsPreferredRenderer(QSize video_size) void VideoOutput::SetVideoFrameRate(float playback_fps) { - video_prate = playback_fps; if (db_vdisp_profile) db_vdisp_profile->SetOutput(playback_fps); } @@ -1540,7 +1538,8 @@ void VideoOutput::ResizeForVideo(uint width, uint height) if ((width == 1920 || width == 1440) && height == 1088) height = 1080; // ATSC 1920x1080 - if (display_res && display_res->SwitchToVideo(width, height, video_prate)) + float rate = db_vdisp_profile ? db_vdisp_profile->GetOutput() : 0.0f; + if (display_res && display_res->SwitchToVideo(width, height, rate)) { // Switching to custom display resolution succeeded // Make a note of the new size diff --git a/mythtv/libs/libmythtv/videooutbase.h b/mythtv/libs/libmythtv/videooutbase.h index 91de7096402..112e4f47808 100644 --- a/mythtv/libs/libmythtv/videooutbase.h +++ b/mythtv/libs/libmythtv/videooutbase.h @@ -288,7 +288,6 @@ class VideoOutput // Video parameters MythCodecID video_codec_id; VideoDisplayProfile *db_vdisp_profile; - float video_prate; ///< Playback frame rate of video // Picture-in-Picture QSize pip_desired_display_size;