Comments (4)
Did you found a workaround for this bug? I've the same issue!
from ffmpegmediaplayer.
same issue on clicking fast
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xf8df41cc
Stack frame I/DEBUG ( 402): #00 pc 0000654e /data/app/package-2/lib/arm/libffmpeg_mediaplayer_jni.so (MediaPlayer::initAudioTrack(int, int, int)+45)
Stack frame I/DEBUG ( 402): #01 pc 00006f93 /data/app/package-2/lib/arm/libffmpeg_mediaplayer_jni.so (stream_component_open+114)
Stack frame I/DEBUG ( 402): #02 pc 0000712f /data/app/package-2/lib/arm/libffmpeg_mediaplayer_jni.so (player_prepare+366)
Stack frame I/DEBUG ( 402): #03 pc 00012e9b /system/lib/libc.so (__pthread_start(void*)+30)
Stack frame I/DEBUG ( 402): #04 pc 00010e73 /system/lib/libc.so (__start_thread+6)
from ffmpegmediaplayer.
Source of evil:
If invoking stop, it will only change the state. the player_prepare is still running and may produce some nullpointer.(ffmpeg_mediaplay.c)
Stupid Java solution: prevent calls until prepared callback is called.
Sample https://github.com/pfaffenrodt/TestFFmpegMediaPlayer
Just realized, stop is only in states after prepare possible:
mCurrentState & ( MEDIA_PLAYER_STARTED | MEDIA_PLAYER_PREPARED |
MEDIA_PLAYER_PAUSED | MEDIA_PLAYER_PLAYBACK_COMPLETE )
Inside the state MEDIA_PLAYER_PREPARING invoke stop() will throw an Error.
ErrorListener in most cases like in the description invoke release(). But prepare is still running.
mp.setOnErrorListener(new FFmpegMediaPlayer.OnErrorListener() {
@Override
public boolean onError(FFmpegMediaPlayer mp, int what, int extra) {
mp.release();
return false;
}
});
static void
wseemann_media_FFmpegMediaPlayer_release(JNIEnv *env, jobject thiz)
{
__android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, "release");
//decVideoSurfaceRef(env, thiz);
MediaPlayer* mp = setMediaPlayer(env, thiz, 0);
if (mp != NULL) {
// this prevents native callbacks after the object is released
JNIMediaPlayerListener *listener = (JNIMediaPlayerListener *) mp->getListener();
delete listener;
mp->setListener(0);
mp->disconnect();
delete mp;
setMediaPlayer(env, thiz, 0);
}
}
from ffmpegmediaplayer.
This should be fixed in version 1.0.1.
from ffmpegmediaplayer.
Related Issues (20)
- Support recording audio or video
- Amazing
- Compile Error
- Is it possible play video h264 through udp(multicast) protocol? HOT 1
- Memory Leak in Android 6 when using FFmpegMediaPlayer
- how to use with Authentication URL? HOT 1
- Problem with build-ffmpeg.sh HOT 1
- Audio delay HLS
- Problem with v-7 nexus
- Prebuild aar for https support is rejected in google play store
- Error when instantiate HOT 1
- Crash
- Repo
- Demo app doesn't work HOT 2
- Demo does not work at all, both local and online video HOT 2
- How to show video on activity view?
- Audio is not matching with video.
- Device gets hot after a minute of playback.
- Unable to Play RTSP stream error thrown E/FFmpegMediaPlayer: Error (0,0)
- setDatasource
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 ffmpegmediaplayer.