Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.6.1
-
None
-
Odroid C1+, Android 4.4.2
-
-
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.