summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@digia.com>2014-06-17 14:28:20 +0200
committerYoann Lopes <yoann.lopes@digia.com>2014-07-03 15:45:46 +0200
commita7f924186c6cbb98ccf9be7e62ecb1eabb022703 (patch)
tree732c0d75f9edc5e02a56bd28c6324bde9ed88130
parentc9b47933501604cf2ec779bd767ff5dd6a33fcb0 (diff)
downloadqtmultimedia-a7f924186c6cbb98ccf9be7e62ecb1eabb022703.tar.gz
GStreamer: fix looping a media when it's loaded from qrc.
When playing a media for the second time, the backend resets the the media by calling setMedia() with the same value. The problem is that setMedia() clears the previous media, which is a QFile in this case and is the one we are trying to set again... The QFile was deleted, causing the current media to be a dangling pointer. Change-Id: I6854b40212fd084d1e31e756a040a02ad103b7ba Reviewed-by: Christian Stromme <christian.stromme@digia.com>
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp
index ff99aa3ff..99c471b5c 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp
+++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp
@@ -371,7 +371,7 @@ void QGstreamerPlayerControl::setMedia(const QMediaContent &content, QIODevice *
emit bufferStatusChanged(0);
}
- if (m_stream) {
+ if (m_stream && m_stream != stream) {
if (m_ownStream)
delete m_stream;
m_stream = 0;