aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Göthel <[email protected]>2024-02-07 02:26:59 +0100
committerSven Göthel <[email protected]>2024-02-07 02:26:59 +0100
commit5bacb8e6887b55ab2053dc5ed76bebcc0743a45e (patch)
tree0c2737cd09be2144b8bb74493aa3159046565c8b
parent2c84a3f7bf97ecfe445cd33a14ac7f968deb3e5e (diff)
GLMediaPlayerImpl: Adjust aid/sid to AUTO if alang/slang is given
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java
index ff683281c..089f91544 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java
@@ -751,15 +751,17 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
}
}
+ final int aid2 = alang != null && alang.length() > 0 ? STREAM_ID_AUTO : aid;
+ final int sid2 = slang != null && slang.length() > 0 ? STREAM_ID_AUTO : sid;
this.vid = vid;
- this.aid = aid;
- this.sid = sid;
+ this.aid = aid2;
+ this.sid = sid2;
new InterruptSource.Thread() {
@Override
public void run() {
try {
// StreamWorker may be used, see API-doc of StreamWorker
- initStreamImpl(vid, alang, aid, slang, sid);
+ initStreamImpl(vid, alang, aid2, slang, sid2);
} catch (final Throwable t) {
streamErr = new StreamException(t.getClass().getSimpleName()+" while initializing: "+GLMediaPlayerImpl.this.toString(), t);
changeState(new GLMediaPlayer.EventMask(GLMediaPlayer.EventMask.Bit.Error), GLMediaPlayer.State.Uninitialized);