libgdx / gdx-video

A libGDX cross platform video rendering extension
Apache License 2.0
147 stars 50 forks source link

Race condition in VideoPlayerAndroid #32

Closed anonl closed 1 year ago

anonl commented 8 years ago

MediaPlayer initialization is performed on the main looper thread, but not all accesses to 'player' are correctly synchronized:

In addition, the done/prepared flag should be made volatile since they're also written to from the looper thread.

Why is the initialization of the MediaPlayer done on the main looper anyway? Can't you use the current thread's looper (or create it if one doesn't exist yet)?

RBogie commented 8 years ago

I'll look into this issue next weekend because of time issues. I hope that's ok for you ;)