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

QMediaPlayer - memory leak

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.1.0 , 5.2.0
    • Multimedia
    • None
    • Windows 7 b.7601 64bit

    Description

      Hello,
      I’ve found a memory leak caused by QMediaPlayer.

      QMediaPlayer::setMedia() increases memory usage, every time its used.
      Deleting player and video output is not releasing memory.

      Example code :
      void MainWindow::play()
      {
      player = new QMediaPlayer;
      surface = new Surface; //implementation of QAbstractVideoSurface
      player->setVideoOutput(surface);
      player->setMedia((QUrl(QString("C:/file.avi")));
      player->setVolume(50);
      player->play();
      }

      void MainWindow::stop()
      {
      player->stop();
      delete player;
      delete surface;
      }

      invoking play() – > stop() -> play() … causes increase in memory usage.
      Surface is not the issue QVideoWidged used as video output causes even more memory to be wasted.
      Tested on 5.1.0 MSVC2012 64bit OpenGl
      and 5.2.0 MSVC2012 64bit ANGLE

      Attachments

        Issue Links

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

          Activity

            People

              ylopes Yoann Lopes
              gibol Paweł Gibaszek
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes