summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/phonon/mmf/abstractvideoplayer.cpp')
-rw-r--r--src/3rdparty/phonon/mmf/abstractvideoplayer.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp b/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp
index 2e0ab1c..ecfce9e 100644
--- a/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp
+++ b/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp
@@ -211,7 +211,8 @@ void MMF::AbstractVideoPlayer::aspectRatioChanged()
TRACE_CONTEXT(AbstractVideoPlayer::aspectRatioChanged, EVideoInternal);
TRACE_ENTRY("state %d aspectRatio %d", state());
- updateScaleFactors(m_videoOutput->videoWindowSize());
+ if (m_videoOutput)
+ updateScaleFactors(m_videoOutput->videoWindowSize());
TRACE_EXIT_0();
}
@@ -221,7 +222,8 @@ void MMF::AbstractVideoPlayer::scaleModeChanged()
TRACE_CONTEXT(AbstractVideoPlayer::scaleModeChanged, EVideoInternal);
TRACE_ENTRY("state %d", state());
- updateScaleFactors(m_videoOutput->videoWindowSize());
+ if (m_videoOutput)
+ updateScaleFactors(m_videoOutput->videoWindowSize());
TRACE_EXIT_0();
}
@@ -357,6 +359,8 @@ void MMF::AbstractVideoPlayer::videoOutputChanged()
void MMF::AbstractVideoPlayer::initVideoOutput()
{
+ Q_ASSERT(m_videoOutput);
+
bool connected = connect(
m_videoOutput, SIGNAL(videoWindowChanged()),
this, SLOT(videoWindowChanged())
@@ -400,6 +404,8 @@ QSize scaleToAspect(const QSize &srcRect, int aspectWidth, int aspectHeight)
void MMF::AbstractVideoPlayer::updateScaleFactors(const QSize &windowSize, bool apply)
{
+ Q_ASSERT(m_videoOutput);
+
if (m_videoFrameSize.isValid()) {
QRect videoRect;