Bug fix? wrt subtitles when playing .vob-file

Erland Lewin erl at voxi.com
Fri Nov 30 18:45:42 CET 2001


Thanks for a great player, it seems to be the one which works the best 
for me (running Linux).

I have a DVD (a Scandinavian release of the cult sci-fi film Nirvana).
  Playing the DVD directly works with subtitles. However, when playing 
the first vob file (instead of the DVD device), subtitles didn't work, 
and the subtitles-menu was disabled. But actually I think the second 
vob-file worked with subtitles if I selected a subtitle channel on the 
command line.
  My theory was that on the DVD it was possible to read which 
subtitle-tracks were available in an easy way, but from the .vob-file it 
was not initially possible to detect which subtitle tracks would appear, 
unless they occur right away.
  After digging a bit in the source I looked at lines 756-769 in 
src/input/mpeg_system.c of release 0.2.91:

                    else if( (i_id & 0xE0FF) == 0x20BD )
                        /* Subtitles video (0x20->0x3F) */
                        p_es->i_type = DVD_SPU_ES;
                        p_es->i_cat = SPU_ES;
                        if( main_GetIntVariable( INPUT_SUBTITLE_VAR, -1 )
                                == ((p_es->i_id & 0x1F00) >> 8) )
                            if( !p_input->stream.b_seekable )
                                input_SelectES( p_input, p_es );

By commenting out the if( !p_input->stream.b_seekable ) (always calling 
input_selectES), I got subtitles when playing the .vob-file, and 
selecting the subtitle channel on the command line!
  I don't know anything about the code, so I havn't a clue as to why 
that if-statement is there, or if the change breaks anything.
  Just thought I'd let you know. This might fix Filip van Dam's 
complaint #2 in his recent mail to the list.
  Please cc: any replies to my e-mail address directly since I don't 
subscribe to the vlc list.

Happy hacking,


More information about the vlc-devel mailing list