From 3363c9168580e50b971b7c470842524a63c29ca7 Mon Sep 17 00:00:00 2001 From: Mark Kendall Date: Mon, 20 Jun 2011 12:27:57 +0800 Subject: [PATCH] VideoOutputOpenGL: Fix blank screen in live tv. Fixes #9770 --- mythtv/libs/libmythtv/videoout_opengl.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/mythtv/libs/libmythtv/videoout_opengl.cpp b/mythtv/libs/libmythtv/videoout_opengl.cpp index 1c21c58a7d5..89a13fc1cb6 100644 --- a/mythtv/libs/libmythtv/videoout_opengl.cpp +++ b/mythtv/libs/libmythtv/videoout_opengl.cpp @@ -224,16 +224,20 @@ bool VideoOutputOpenGL::InputChanged(const QSize &input_size, return false; } - if (input_size == window.GetActualVideoDim()) + bool cid_changed = (video_codec_id != av_codec_id); + bool res_changed = input_size != window.GetActualVideoDim(); + bool asp_changed = aspect != window.GetVideoAspect(); + + if (!res_changed && !cid_changed) { - aspect_only = video_codec_id == av_codec_id; - if (window.GetVideoAspect() != aspect) + if (asp_changed) { + aspect_only = true; VideoAspectRatioChanged(aspect); MoveResize(); - if (wasembedding) - EmbedInWidget(oldrect); } + if (wasembedding) + EmbedInWidget(oldrect); return true; } @@ -479,7 +483,6 @@ void VideoOutputOpenGL::ProcessFrame(VideoFrame *frame, OSD *osd, void VideoOutputOpenGL::PrepareFrame(VideoFrame *buffer, FrameScanType t, OSD *osd) { - (void)osd; if (!gl_context) return;