From 23d9acb7df0bfb2e5a4704c3583d92d5d0cf2cdd Mon Sep 17 00:00:00 2001 From: phintuka Date: Thu, 15 Dec 2011 10:00:34 +0000 Subject: Added range check for audio/SPU streams --- xine/BluRay/input_bluray.c | 12 ++++++++++-- 1 file 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); } -- cgit v1.2.3