[vlc-commits] access: bluray: workaround stream deselection

Francois Cartegnie git at videolan.org
Wed Oct 17 23:51:49 CEST 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Oct 17 23:46:16 2018 +0200| [b385c2763f72dca4df5fef3013503ae3ef095cc6] | committer: Francois Cartegnie

access: bluray: workaround stream deselection

In no menu mode, stream selection is reset in
libbluray registers, depending on language preference.

A more complete fix will require patching libbluray
to retain full selection (pid|lang+format|lang)
as lang can have duplicate entries.

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

 modules/access/bluray.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index 2afd2af504..cedf1b3b69 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -1936,11 +1936,15 @@ static void blurayOnUserStreamSelection(demux_sys_t *p_sys, int i_pid)
     vlc_mutex_lock(&p_sys->pl_info_lock);
 
     if (p_sys->p_clip_info) {
+
         if ((i_pid & 0xff00) == 0x1100) {
             // audio
             for (int i_id = 0; i_id < p_sys->p_clip_info->audio_stream_count; i_id++) {
                 if (i_pid == p_sys->p_clip_info->audio_streams[i_id].pid) {
                     bd_select_stream(p_sys->bluray, BLURAY_AUDIO_STREAM, i_id + 1, 1);
+                    if(!p_sys->b_menu)
+                        bd_set_player_setting_str(p_sys->bluray, BLURAY_PLAYER_SETTING_AUDIO_LANG,
+                                  (const char *) p_sys->p_clip_info->audio_streams[i_id].lang);
                     break;
                 }
             }
@@ -1949,6 +1953,9 @@ static void blurayOnUserStreamSelection(demux_sys_t *p_sys, int i_pid)
             for (int i_id = 0; i_id < p_sys->p_clip_info->pg_stream_count; i_id++) {
                 if (i_pid == p_sys->p_clip_info->pg_streams[i_id].pid) {
                     bd_select_stream(p_sys->bluray, BLURAY_PG_TEXTST_STREAM, i_id + 1, 1);
+                    if(!p_sys->b_menu)
+                        bd_set_player_setting_str(p_sys->bluray, BLURAY_PLAYER_SETTING_PG_LANG,
+                                   (const char *) p_sys->p_clip_info->pg_streams[i_id].lang);
                     break;
                 }
             }



More information about the vlc-commits mailing list