Comments (6)
Well I found the solution after playing around with the code:
In SDL_androidvideo.c:
1-In funtion DemoRenderer_nativeInitJavaCallbacks:
*********Orginal********
JavaRenderer = thiz;
JavaRendererClass = (*JavaEnv)->GetObjectClass(JavaEnv, thiz);
*******Modified*********
JavaRenderer = (*JavaEnv)->NewGlobalRef(JavaEnv,thiz);
JavaRendererClass = (*JavaEnv)->GetObjectClass(JavaEnv, JavaRenderer);
2- In CallJavaExitFromNativePlayerView
******Add this to delete the GlobalReference******
(*JavaEnv)->DeleteGlobalRef(JavaEnv,JavaRenderer);
Also consider in SDL_androidaudio.c adding the line:
(*jniEnv)->DeleteGlobalRef(jniEnv, JavaAudioThread);
for example in function ANDROIDAUD_CloseAudio()
Original comment by [email protected]
on 8 Sep 2012 at 1:40
from dolphin-player.
For the moment do not add
(*JavaEnv)->DeleteGlobalRef(JavaEnv,JavaRenderer);
in CallJavaExitFromNativePlayerView
Its causing a JNI_ERROR, I guess must be deleted somewhere else.
Original comment by [email protected]
on 8 Sep 2012 at 1:49
from dolphin-player.
[deleted comment]
from dolphin-player.
Original comment by aatrala
on 8 Sep 2012 at 1:53
from dolphin-player.
This problem is reproducible as mentioned. Above mentioned idea is correct for
fixing the problem. Needs to be called at exit. Will be fixed in the next
release.
Original comment by aatrala
on 8 Sep 2012 at 1:57
from dolphin-player.
I think is still necessary to figure out when to call
(*JavaEnv)->DeleteGlobalRef(JavaEnv,JavaRenderer);
in SDL_androidvideo.c
I tried adding it in CallJavaExitFromNativePlayerView but gives a JNI_ERROR
error when back button pressed during playing.
Not Deleting globalref doesn't seem to cause a problem
Original comment by [email protected]
on 8 Sep 2012 at 2:05
from dolphin-player.
Related Issues (20)
- How to watch a video via http? HOT 3
- app crashs in armv6 processor device HOT 3
- App can't play videos on some HTC devices
- Is there a way to reduce the size of ffmpeg.so HOT 1
- How to play 2 chunks without an audio gap? HOT 1
- how to fix the video lagging problem? HOT 2
- build error HOT 1
- play mp4 file very lag.
- Compilation error found while compiling nextgen source
- Does this project have memory leak problem? HOT 6
- Build problem
- undefined reference to `player_main HOT 13
- ndk-build error HOT 1
- Build for different package fail. HOT 1
- Adding targetSdkVersion greater than 13 on Manifest file does not allow to play video
- Can app play video with slow motion include audio?
- Rtmp streaming cannot seek. HOT 5
- Desynchronized video and audio when there's low network speed
- ffmpeg.so is not generated
- select APP_ABI := armeabi
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dolphin-player.