You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
phonon/phonon-4.3.80-fix-gstreamer...

64 lines
2.4 KiB

From 104872f266cf6675e27cc6e122300f4ed5baf3ab Mon Sep 17 00:00:00 2001
From: Colin Guthrie <cguthrie@mandriva.org>
Date: Wed, 13 Jan 2010 22:57:29 +0000
Subject: [PATCH] gstreamer: Fix a problem where the fact a reset was needed was lost.
If you create the path (createPath()) *before* setting the media source,
(setCurrentSource()) the gstreamer backend would forget the fact that a reset
was needed and ultimately end up in an error state.
This change simply does not wipe out the m_resetNeeded flag when
the source is set and leaves it as it is.
This fixes the test case application posted on
https://qa.mandriva.com/show_bug.cgi?id=56807
---
gstreamer/mediaobject.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/gstreamer/mediaobject.cpp b/gstreamer/mediaobject.cpp
index 15eb080..40e4246 100644
--- a/gstreamer/mediaobject.cpp
+++ b/gstreamer/mediaobject.cpp
@@ -916,7 +916,9 @@ void MediaObject::setSource(const MediaSource &source)
// Go into to loading state
changeState(Phonon::LoadingState);
m_loading = true;
- m_resetNeeded = false;
+ // IMPORTANT: Honor the m_resetNeeded flag as it currently stands.
+ // See https://qa.mandriva.com/show_bug.cgi?id=56807
+ //m_resetNeeded = false;
m_resumeState = false;
m_pendingState = Phonon::StoppedState;
--
1.6.6
commit 6fbea9b56a12281819a8c04afd5caa53cfeee39f
Author: cguthrie <cguthrie@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>
Date: Thu Jan 21 18:23:12 2010 +0000
gstreamer: Fix a problem encountered when playing, stopping and playing again.
As reported by Harald Fernengel, a similar problem to that fixed in r1076454
also exists when you play->stop->play a media object.
This should fix the issue by marking a reset needed whenever we reach the stopped state.
Thanks to Harald for finding the problem and pointing the way to the fix.
git-svn-id: svn+ssh://svn.kde.org/home/kde/trunk/kdesupport/phonon@1078188 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
diff --git a/gstreamer/mediaobject.cpp b/gstreamer/mediaobject.cpp
index 509e749..d1707dd 100644
--- a/gstreamer/mediaobject.cpp
+++ b/gstreamer/mediaobject.cpp
@@ -741,6 +741,8 @@ void MediaObject::changeState(State newstate)
case Phonon::StoppedState:
m_backend->logMessage("phonon state changed: Stopped", Backend::Info, this);
+ // We must reset the pipeline when playing again
+ m_resetNeeded = true;
m_tickTimer->stop();
break;