Patches for MPlayer

Suppress Subtitles by Default

Back in the day, MPlayer did not show DVD subtitles, unless a subtitle track was selected. Some (quite long) time ago that changed. MPlayer will now randomly select one of the available subtitle tracks of the DVD and display this, if no subtitle track is manually specified.

You can turn the subtitle visibility to off after starting playback (default key is v) or give the -nosub option on the command line. Since there is no -nonosub option, you cannot add nosub to the MPlayer config and turn subtitles on for selected video DVDs using command line options.

When using my dvdmovie script, you could add -nosub for every video DVD containing subtitles to your $HOME/.dvdmovierc file, if you don't want the subtitles displayed.

IMHO MPlayer should do the right thing and not display DVD subtitles by default. I have written a patch for MPlayer to do this. Subtitle visibility is turned off, if no subtitle is given using one of MPlayer's mechanisms to do so (e.g. command line option or subtitle file next to movie file). I am using this patch since September 2011. I have sent the patch to the MPlayer development mailing list, but it has not been accepted for inclusion.

Download mplayer-default_subtitle_visibility_off.patch.

Don't Dereference NULL Pointer in stream/stream_dvd.c::list_chapters()

This fixes playback of the German Resident Evil: Extinction DVD using dvd://

*** This has been fixed in MPlayer svn revision 36908, so this patch is obsolete. ***

MPlayer cannot play the German DVD of Resident Evil: Extinction using the dvd:// protocol (using dvdnav:// works). Reason is a NULL pointer dereference while building a chapter list (which will be printed with the -identify option and not used otherwise) in the function stream/stream_dvd.c::list_chapters(). The root cause is very likely a badly mastered DVD, but MPlayer should not crash on malformed input.

One way of tackling the problem would be skipping the stream/stream_dvd.c::list_chapters() function unless the -identify option is given. This would result in working playback of this DVD if the main title track number is already known. To find out the track number, the -identify option is very useful, unless it crashes MPlayer. Thus I do not recommend this. (My dvdmovie script uses -identify to find the main title.)

The obvious solution to this problem is not dereferencing the NULL pointer. I have reported the issue in the MPlayer Bugzilla and written two patches to fix this (first version, second version), but the solution was not deemed appropriate and the issue still persists. The second version of the patch might be more robust, because it just ignores NULL entries. The first is more conservative and safe, because it aborts the chapter list function on the first encountered NULL entry.

I have been using the second version of the patch since February 2013 without problems with a lot of DVDs.

Download mplayer-dvd-fix_re3_playback-v2.patch.


back to my homepage.