You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The malloc for DecoderData at `player_start_decoding_threads' is being passed size-of-pointer and not size-of-struct.
I was getting random SIGSEGVs due to DecoderData being corrupt (I build with ndk r10e and run on Android 5.1); once applying the fix it seems to work fine.
Thank you and kind regards,
Marco.
diff --git a/library-jni/jni/player.c b/library-jni/jni/player.c
index 7ffdd33..44657b3 100644
--- a/library-jni/jni/player.c
+++ b/library-jni/jni/player.c
@@ -2058,7 +2058,7 @@ int player_start_decoding_threads(struct Player *player) {
goto end;
}
for (i = 0; i < player->caputre_streams_no; ++i) {
- struct DecoderData * decoder_data = malloc(sizeof(decoder_data));
+ struct DecoderData * decoder_data = malloc(sizeof(*decoder_data));
*decoder_data = (struct DecoderData) {player: player, stream_no: i};
ret = pthread_create(&player->decode_threads[i], &attr, player_decode,
decoder_data);
The text was updated successfully, but these errors were encountered:
Hello,
The malloc for DecoderData at `player_start_decoding_threads' is being passed size-of-pointer and not size-of-struct.
I was getting random SIGSEGVs due to DecoderData being corrupt (I build with ndk r10e and run on Android 5.1); once applying the fix it seems to work fine.
Thank you and kind regards,
Marco.
The text was updated successfully, but these errors were encountered: