gdx-video icon indicating copy to clipboard operation
gdx-video copied to clipboard

Race condition in VideoPlayerAndroid

Open anonl opened this issue 9 years ago • 1 comments

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

  • stop()
  • dispose()
  • isPlaying()
  • setVolume()

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)?

anonl avatar Jun 26 '16 07:06 anonl

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

RBogie avatar Jun 26 '16 07:06 RBogie