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

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

          Activity

            People

            Assignee:
            stromme Christian
            Reporter:
            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