Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-872

QMediaPlayer setvideoSource - Segmentation Fault

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 5.12.0
    • 5.11.2
    • PySide
    • None
    • Linux/X11, Windows
    • 4018787a3cc01d632fdca7891ac8aa9487110c26

    Description

      Trying to get a basic QMediaPlayer (video player) implementation to work. Program crashes when setting video source for the QMediaPlayer. Tried both QVideoWidget and QGraphicsVideoItem and both crash when implementing the player.setVideoSource() line

      Code in the main function shown below: 
       

      if __name__ == '__main__': 
          app = QApplication(sys.argv)
          player = QMediaPlayer()
          playlist = QMediaPlaylist(player)   
          playlist.addMedia(QMediaContent(QUrl.fromLocalFile("/path/to/video.mp4")))    
          playlist.setPlaybackMode(QMediaPlaylist.Loop) 
          player.setPlaylist(playlist) 
          vw = QVideoWidget() 
          player.setVideoOutput(vw) # this line triggers the error
          vw.show()
          player.play() 
          sys.exit(app.exec_())

      Windows 10 command line error on crash:

      Segmentation fault

      Attachments

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

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            fifapollo Fifi Apollo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes