From b63c58e850b0a5377defd68583284c8711dce0e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 6 Sep 2012 17:07:12 +0200 Subject: [PATCH] The MediaCodec API is apparently not threadsafe between stop() and release() So we don't call release() and just hope for the GC to release the codec in time. --- sys/androidmedia/gstamcvideodec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/androidmedia/gstamcvideodec.c b/sys/androidmedia/gstamcvideodec.c index 86c2675d83..8cd1838a05 100644 --- a/sys/androidmedia/gstamcvideodec.c +++ b/sys/androidmedia/gstamcvideodec.c @@ -391,7 +391,13 @@ gst_amc_video_dec_close (GstVideoDecoder * decoder) GST_DEBUG_OBJECT (self, "Closing decoder"); if (self->codec) { + /* FIXME: This crashes for some reason, looks like the + * MediaCodec API is not threadsafe between stop() and + * release() + */ +#if 0 gst_amc_codec_release (self->codec); +#endif gst_amc_codec_free (self->codec); } self->codec = NULL;