Unsolved Qml VideoOutput doesn't work after setting source to null once
-
import QtQuick 2.7 import QtQuick.Controls 2.0 import QtMultimedia 5.8 ApplicationWindow { visible: true width: 640 height: 480 property bool flip: true Timer { interval: 5000 running: true repeat: true onTriggered: { flip = !flip if(flip) { videoOutput.source = null } else { videoOutput.source = player } } } VideoOutput { id: videoOutput anchors.fill: parent source: player } MediaPlayer { id: player source: "file://video.mp4" autoPlay: true loops: MediaPlayer.Infinite } }
After a few a trigger of
Timer
that setsvideoOutput.source
tonull
, it will never work again. TheVideoOutput
will just have a stale painting of a previously decoded frame, and will never change.Cross posted here.
-
Any update on this?
I think I'm running into the same issue. This problem seems to be present on Linux, but not on Windows.
-
Why not change the source on the MediaPlayer rather than the VideoOuput?
-
That works thanks.
-
@lplessard I feel like I have closure now. ;-)