libgdx / gdx-video

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

NPE when playing ogg video without audio #9

Closed mnn closed 8 years ago

mnn commented 8 years ago
Exception in thread "LWJGL Application" java.lang.NullPointerException
    at com.badlogic.gdx.video.RawMusic.read(RawMusic.java:46)
    at com.badlogic.gdx.backends.lwjgl.audio.OpenALMusic.fill(OpenALMusic.java:240)
    at com.badlogic.gdx.backends.lwjgl.audio.OpenALMusic.play(OpenALMusic.java:85)
    at com.badlogic.gdx.video.VideoPlayerDesktop.render(VideoPlayerDesktop.java:205)
    at ...

[VideoPlayer::loadFile] Could not find audio stream!
RBogie commented 8 years ago

Thank you for reporting! Unfortunately, I'm really busy at the moment. I'll try to find some time as soon as possible though.

mnn commented 8 years ago

No need to rush it, I don't think many users will be playing video without sound ;). And also the workaround is pretty simple - adding silent audio track.

RBogie commented 8 years ago

I pushed a possible fix for this issue. Could you try out the code in PR #10? If it indeed fixes the bug, it will be merged to develop.

mnn commented 8 years ago

Yes, it does fix the bug. Thank you :). Here's the sample file I was using.

RBogie commented 8 years ago

Great to hear it is working now!