[Confluence] align subtitle popup to the bottom
[vuplus_xbmc] / xbmc / cores / dvdplayer / DVDCodecs / Video / StageFrightVideoPrivate.cpp
index f89fa63..996a38d 100644 (file)
@@ -321,9 +321,10 @@ bool CStageFrightVideoPrivate::InitStagefrightSurface()
   glBindTexture(GL_TEXTURE_EXTERNAL_OES, 0);
 
   mSurfTexture = new CJNISurfaceTexture(mVideoTextureId);
-  mSurface = new CJNISurface(mSurfTexture);
+  mSurface = new CJNISurface(*mSurfTexture);
 
   mVideoNativeWindow = ANativeWindow_fromSurface(env, mSurface->get_raw());
+  native_window_api_connect(mVideoNativeWindow.get(), NATIVE_WINDOW_API_MEDIA);
 
   return true;
 }
@@ -333,6 +334,7 @@ void CStageFrightVideoPrivate::UninitStagefrightSurface()
   if (mVideoNativeWindow == NULL)
     return;
 
+  native_window_api_disconnect(mVideoNativeWindow.get(), NATIVE_WINDOW_API_MEDIA);
   ANativeWindow_release(mVideoNativeWindow.get());
   mVideoNativeWindow = NULL;