Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-95626

[REG] Audio playback is not stopped on MediaPlayer destruction

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 6.2.0, 6.2.1, 6.3.0 Alpha
    • 6.2.0 Beta4
    • Multimedia
    • None
    • Windows 10, MSVC 2019
    • Windows
    • e93a3c66bef99e291c6ee5e5fd183900bc89b223 (qt/qtmultimedia/dev) 19d50b8912b4990383f4d3e640603f3cfb07f979 (qt/qtmultimedia/6.2) d9b7648d63da7367791c3b40e31eb70315491493 (qt/qtmultimedia/6.2.0)

    Description

      Audio playback is not stopped on MediaPlayer destruction.
      Probably specific issue for Windows WMF backend.
      Regression from Qt 5.15.2.

      Code example:

      import QtQuick
      import QtQuick.Window
      import QtMultimedia
      
      Window {
          width: 640
          height: 480
          visible: true
      
          Loader {
              id: mediaPlayerLoader
              sourceComponent: MediaPlayer {
                  videoOutput: output
                  audioOutput: AudioOutput {}
      
                  // you can use any local or web media source with sound instead
                  source: "https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-mp4-file.mp4"
                  Component.onCompleted: play()
                  Component.onDestruction: {
                      console.log("MediaPlayer destroyed!!! But you still hear a sound!")
                  }
              }
          }
      
          VideoOutput {
              id: output
              anchors.fill: parent
      
              MouseArea {
                  anchors.fill: parent
                  onClicked: mediaPlayerLoader.active = !mediaPlayerLoader.active
              }
          }
      }
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              piotr Piotr Srebrny (Inactive)
              studiosus Vladimir Belyavsky
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes