From f15ace1296b62514022e51584d02f63fff356b3f Mon Sep 17 00:00:00 2001 From: James Willcox Date: Thu, 12 Nov 2015 14:52:42 -0600 Subject: [PATCH] Bug 1221228 - Work around busted OpenSL causing hangs/reboots on Android r=padenot --- media/libcubeb/src/cubeb_opensl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/media/libcubeb/src/cubeb_opensl.c b/media/libcubeb/src/cubeb_opensl.c index a46489b750f7..7642e029ef6e 100644 --- a/media/libcubeb/src/cubeb_opensl.c +++ b/media/libcubeb/src/cubeb_opensl.c @@ -641,6 +641,9 @@ opensl_stream_init(cubeb * ctx, cubeb_stream ** stream, char const * stream_name return CUBEB_ERROR; } + // Work around wilhelm/AudioTrack badness, bug 1221228 + (*stm->play)->SetMarkerPosition(stm->play, (SLmillisecond)0); + res = (*stm->play)->SetCallbackEventsMask(stm->play, (SLuint32)SL_PLAYEVENT_HEADATMARKER); if (res != SL_RESULT_SUCCESS) { opensl_stream_destroy(stm);