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

[REG]: Memory leak in video player on Android

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.6.2
    • 5.6.1
    • Multimedia
    • None
    • Odroid C1+, Android 4.4.2
    • Android
    • 443ed0be093b2d8e78d111a59eca97f2eba5b0fe, 124987e4bc4b39cae7074eb75e2bb3e3436aded0

    Description

      In Android video player there is QAndroidTextureVideoOutput class that renders java MediaPlayer output to GL texture. As a backend it uses Android's SurfaceTexture.

      On android SDK version >= 16 java SurfaceTexture's attachToGLContext method is used for texture initialization.

      When changing player source, QAndroidTextureVideoOutput::reset() method is called, that calls QAndroidTextureVideoOutput::clearSurfaceTexture(), where current GL texture is silently reset without actual deletion (http://code.qt.io/cgit/qt/qtmultimedia.git/tree/src/plugins/android/src/common/qandroidvideooutput.cpp?id=ba8127639857232d8a37e953c5cda84203360d97#n255). This causes out of memory error in android's hardware video decoder when continuously playing two or more videos by changing player's source.

      Seems like SurfaceTexture's destruction does not cause texture deletion when it is used with attachToGLContext method, so, ether detachFromGLContext should be used, or texture id should not be reset.

      Attachments

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

        Activity

          People

            stromme Christian
            paullo Pavel Golikov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes