Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
None
-
5.15.8, 6.4.3
-
Arch Linux with wayland and package qt6-multimedia-gstreamer providing qt6-multimedia-backend
-
-
73ea8550a (dev), b65d639ba (6.8), f6558e390 (6.8.0), b63aede49 (6.7), 3a8f6da8b (tqtc/lts-6.5), cc17f25cd (dev), ff795c101 (6.8), bedf812aa (tqtc/lts-6.5)
Description
Consider a QMediaPlayer object playing a video shown in a QVideoWidget.
After the playback stops because video has reached its end, the QMediaPlayer may have position()==duration()-320, mediaStatus()==BufferedMedia, and playbackState==PlayingState. The user may now set the playback position: player->setPosition(...);. This (often) leads to the main thread hanging up.
Use case: A user may have a slider or other tools to control the playback position. Typically the maximum value for the slider is duration().
Steps to reproduce: Make sure you use the gstreamer backend. The attached program takes as a command line argument the path to a video file. Choose a short video file (a few seconds is enough) and run the program. You should see the video playing. You can use the arrow keys (right/left) to move forward/backward by 1s. After the video has reached its end, try to navigate backward/forward. In some cases this will work, in others the program will hang up.
BTW: There are a few more bugs, which are less severe. For example, the QMediaPlayer::loops property has no effect. More difficult to reproduce: With the gstreamer backend the audio sometimes vanishes randomly. For users of Arch Linux I highly recommend using the ffmpeg backend instead of gstreamer (except if you want to show live streams).
UPDATE: Qt 5.15.8 is also affected. To test this, you can use the updated version of the attached program, which can be configured to use Qt 5 with cmake -DQT_VERSION_MAJOR=5.
Attachments
Issue Links
- relates to
-
QTBUG-95245 MediaPlayer::setPosition() while loading freezes the main thread/GUI on gstreamer
-
- Closed
-
- split to
-
QTBUG-123056 GStreamer: `setLoops` sometimes not working
-
- Closed
-