[vlc-commits] contribs: bluray: fix stream selection without menus

Francois Cartegnie git at videolan.org
Mon Nov 19 16:41:20 CET 2018


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Nov 13 23:15:23 2018 +0100| [177a4a2a5f36a00af42a861e316939b3f29bc16e] | committer: Francois Cartegnie

contribs: bluray: fix stream selection without menus

(cherry picked from commit a2e6e10430d24eb5e0ad006b16212af9c09fe830)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=177a4a2a5f36a00af42a861e316939b3f29bc16e
---

 ...h-menuless-user-selected-streams-between-.patch | 51 ++++++++++++++++++++++
 contrib/src/bluray/rules.mak                       |  1 +
 2 files changed, 52 insertions(+)

diff --git a/contrib/src/bluray/0001-keep-on-with-menuless-user-selected-streams-between-.patch b/contrib/src/bluray/0001-keep-on-with-menuless-user-selected-streams-between-.patch
new file mode 100644
index 0000000000..ea81cc3d78
--- /dev/null
+++ b/contrib/src/bluray/0001-keep-on-with-menuless-user-selected-streams-between-.patch
@@ -0,0 +1,51 @@
+From 35f1bcc4885f84b3c4836ba1ffea8db6ec4f2682 Mon Sep 17 00:00:00 2001
+From: Francois Cartegnie <fcvlcdev at free.fr>
+Date: Tue, 13 Nov 2018 23:10:30 +0100
+Subject: [PATCH] keep on with menuless user selected streams between clips
+
+---
+ src/libbluray/bluray.c | 20 ++------------------
+ 1 file changed, 2 insertions(+), 18 deletions(-)
+
+diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
+index 1728801..aa3135e 100644
+--- a/src/libbluray/bluray.c
++++ b/src/libbluray/bluray.c
+@@ -323,24 +323,8 @@ static void _update_clip_psrs(BLURAY *bd, NAV_CLIP *clip)
+     /* Update selected audio and subtitle stream PSRs when not using menus.
+      * Selection is based on language setting PSRs and clip STN.
+      */
+-    if (bd->title_type == title_undef) {
+-
+-        if (stn->num_audio) {
+-            _update_stream_psr_by_lang(bd->regs,
+-                                       PSR_AUDIO_LANG, PSR_PRIMARY_AUDIO_ID, 0,
+-                                       stn->audio, stn->num_audio,
+-                                       &audio_lang, 0);
+-        }
+-
+-        if (stn->num_pg) {
+-            _update_stream_psr_by_lang(bd->regs,
+-                                       PSR_PG_AND_SUB_LANG, PSR_PG_STREAM, 0x80000000,
+-                                       stn->pg, stn->num_pg,
+-                                       NULL, audio_lang);
+-        }
+-
+     /* Validate selected audio, subtitle and IG stream PSRs when using menus */
+-    } else {
++    {
+         uint32_t psr_val;
+ 
+         if (stn->num_audio) {
+@@ -367,7 +351,7 @@ static void _update_clip_psrs(BLURAY *bd, NAV_CLIP *clip)
+             }
+             bd_psr_unlock(bd->regs);
+         }
+-        if (stn->num_ig) {
++        if (stn->num_ig && bd->title_type != title_undef) {
+             bd_psr_lock(bd->regs);
+             psr_val = bd_psr_read(bd->regs, PSR_IG_STREAM_ID);
+             if ((psr_val == 0) || (psr_val > stn->num_ig)) {
+-- 
+2.17.2
+
diff --git a/contrib/src/bluray/rules.mak b/contrib/src/bluray/rules.mak
index c2de93fd89..d147afb153 100644
--- a/contrib/src/bluray/rules.mak
+++ b/contrib/src/bluray/rules.mak
@@ -49,6 +49,7 @@ $(TARBALLS)/libbluray-$(BLURAY_VERSION).tar.bz2:
 bluray: libbluray-$(BLURAY_VERSION).tar.bz2 .sum-bluray
 	$(UNPACK)
 	$(APPLY) $(SRC)/bluray/0001-Implement-dl_get_path-for-darwin-macOS.patch
+	$(APPLY) $(SRC)/bluray/0001-keep-on-with-menuless-user-selected-streams-between-.patch
 	$(call pkg_static,"src/libbluray.pc.in")
 	$(MOVE)
 



More information about the vlc-commits mailing list