[vlc-devel] [PATCH 3/3] mediacodec: implementation of MediaCodec direct rendering based on the work by Martin Storsjö.
Rémi Denis-Courmont
remi at remlab.net
Sun Dec 22 20:01:51 CET 2013
Le dimanche 15 décembre 2013, 00:58:33 Martin Storsjö a écrit :
> So after a few more minutes of digging around, I see that this actually
> already is taken care of. By adding this into the MediaCodec loop that
> waits for a ready input/output buffer, this seem to work just fine for me:
>
> + if (!vlc_object_alive(p_dec)) {
> + (*myVm)->DetachCurrentThread(myVm);
> + return NULL;
> + }
I don't think you can rely on object "liveness" in a decoder. For one thing, I
doubt it would work in stream output. And I strongly suspect it carries
intrinsic race conditions in normal output since the flag is not set from the
decoder thread.
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list