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

QML MediaPlayer crashed when try to switch a media source

    XMLWordPrintable

Details

    Description

      This code causes an application crash:

      import QtQuick 2.3
      import QtQuick.Window 2.2
      import QtMultimedia 5.0
      
      Window {
          visible: true
          MediaPlayer {
              id: mp
              autoPlay: true
          }
          Timer {
              id: t
              interval: 100
              running: true
              repeat: true
              property bool toggled;
              onTriggered: {
                  toggled = !toggled;
                  mp.source = toggled ? "" : "qrc:/song.mp3"
              }
          }
      }
      

      see minimal example in atatchment.

      This happens even when switch with the 5, 10 seconds timeouts, and maybe longer..

      Attachments

        1. mm-bug.7z
          3.10 MB
          Denis Shienkov
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            stromme Christian
            kuzulis Denis Shienkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes