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

QAudioDecoder memory leak

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.8.0
    • Fix Version/s: 5.9.3
    • Component/s: Multimedia
    • Labels:
      None
    • Environment:
      CentOS7.1x64 (GStreamer_1.0 is used as QAudioDecoder backend)

      Description

      I have found that this custom function produce memory leak:

      void readSoundRecord(const QString &_fileName, QAudioFormat &_format, QByteArray &_bytearray)
      { 
          QAudioDecoder audiodecoder;
      
          connect(&audiodecoder, SIGNAL(error(QAudioDecoder::Error)), this, SLOT(audioDecoderError(QAudioDecoder::Error)));
          audiodecoder.setSourceFilename(_fileName);
      
          QEventLoop _el;
          connect(&audiodecoder, SIGNAL(finished()), &_el, SLOT(quit()));
          connect(&audiodecoder, SIGNAL(error(QAudioDecoder::Error)), &_el, SLOT(quit()));
          connect(&audiodecoder, &QAudioDecoder::bufferReady, [&audiodecoder, &_bytearray, &_format] () {
              QAudioBuffer _ab = audiodecoder.read();
              _format = _ab.format();
              _bytearray.append(QByteArray(_ab.constData<char>(),_ab.byteCount()));
          });
          audiodecoder.start();
          _el.exec();
      }
      
      

      this issue can be reproduced in CentOS7.1x64, in Windows all works fine (no leaks). So it seems that problem somwhere between QAudioDecoder and GStreamer_1.0.

        Attachments

        For Gerrit Dashboard: QTBUG-62789
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            valentyn.doroshchuk Valentyn Doroshchuk
            Reporter:
            pi-null-mezon Alex Taranov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes