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

Francois Cartegnie git at videolan.org
Tue Oct 30 18:12:32 CET 2018


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Oct 17 23:46:16 2018 +0200| [1001cfbfc6e5b51e521ec1f68078e6fa0c41d008] | 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.

(cherry picked from commit e5b7476395f56ad683abe50e7e4091cb451c7755)

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

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

diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index cc8372c4c9..38116ab9b6 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -1919,11 +1919,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;
                 }
             }
@@ -1932,6 +1936,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