[MPlayer-users] DVDNAV problem: subtitles

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Nov 6 10:19:56 CET 2009


On Fri, Nov 06, 2009 at 02:59:34AM -0200, Dâniel Fraga wrote:
> 4) -slang still doesn't work for dvdnav:// although it always worked
> for dvd://. But I'm happy that at least now, dvdnav:// will not
> "forget" the subtitle selection when changing chapters.

The subtitle<->language mapping is broken with dvdnav, thus it can't
work.
However this issue only exists because your DVD has "holes", i.e.
subtitle 0 does not exist, but 1 does, two does not exist but 3 does
etc.
I do not have any such DVD, so I can't test it and I don't know libdvdnav
well enough to know what I am doing, but please test what attached patch
changes (preferably with output again like for the others).
Note that selecting subtitles from the menu I think is just a not
implemented feature, and I'm not going to implement it (I don't even
use that feature with my hardware DVD players :-) ).
-------------- next part --------------
Index: stream/stream_dvdnav.c
===================================================================
--- stream/stream_dvdnav.c	(revision 29832)
+++ stream/stream_dvdnav.c	(working copy)
@@ -556,9 +556,9 @@
       tmp[1] = lang & 0xFF;
       tmp[2] = 0;
     }
-    mp_msg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDsubtitleLanguage, i, tmp);
+    mp_msg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDsubtitleLanguage, lg, tmp);
     if (lang != 0xFFFF && lang && tmp[0])
-        mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SID_%d_LANG=%s\n", i, tmp);
+        mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SID_%d_LANG=%s\n", lg, tmp);
   }
 }
 
@@ -820,8 +820,7 @@
     uint16_t lang;
     dvdnav_priv_t *priv = stream->priv;
     if(sid < 0) return 0;
-    lg = dvdnav_get_spu_logical_stream(priv->dvdnav, sid);
-    lang = dvdnav_spu_stream_to_lang(priv->dvdnav, lg);
+    lang = dvdnav_spu_stream_to_lang(priv->dvdnav, sid);
     if(lang == 0xffff) return 0;
     buf[0] = lang >> 8;
     buf[1] = lang & 0xFF;


More information about the MPlayer-users mailing list