summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2011-12-15 10:00:34 +0000
committerphintuka <phintuka>2011-12-15 10:00:34 +0000
commit23d9acb7df0bfb2e5a4704c3583d92d5d0cf2cdd (patch)
treea7fe2511ffe6a86971b6c37d35b2197bb1d44776
parent67b378c5691846237ef4a6cd314603e45b442076 (diff)
downloadxineliboutput-23d9acb7df0bfb2e5a4704c3583d92d5d0cf2cdd.tar.gz
xineliboutput-23d9acb7df0bfb2e5a4704c3583d92d5d0cf2cdd.tar.bz2
Added range check for audio/SPU streams
-rw-r--r--xine/BluRay/input_bluray.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/xine/BluRay/input_bluray.c b/xine/BluRay/input_bluray.c
index 1b2da58a..6b2bb874 100644
--- a/xine/BluRay/input_bluray.c
+++ b/xine/BluRay/input_bluray.c
@@ -786,7 +786,11 @@ static void handle_libbluray_event(bluray_input_plugin_t *this, BD_EVENT ev)
case BD_EVENT_AUDIO_STREAM:
lprintf("BD_EVENT_AUDIO_STREAM %d\n", ev.param);
- update_audio_channel(this, ev.param - 1);
+ if (ev.param < 32) {
+ update_audio_channel(this, ev.param - 1);
+ } else {
+ update_audio_channel(this, 0);
+ }
break;
case BD_EVENT_PG_TEXTST:
@@ -797,7 +801,11 @@ static void handle_libbluray_event(bluray_input_plugin_t *this, BD_EVENT ev)
case BD_EVENT_PG_TEXTST_STREAM:
lprintf("BD_EVENT_PG_TEXTST_STREAM %d\n", ev.param);
- this->pg_stream = ev.param - 1;
+ if (ev.param < 64) {
+ this->pg_stream = ev.param - 1;
+ } else {
+ this->pg_stream = -1;
+ }
if (this->pg_enable) {
update_spu_channel(this, this->pg_stream);
}