[vlc-devel] [VLC] #2468: VLC 0.9.8a crahes when opening a mpeg2-file with .mod-extension.

Laurent Aimar fenrir at via.ecp.fr
Mon Feb 2 11:24:23 CET 2009

On Mon, Feb 02, 2009, Rémi Denis-Courmont wrote:
> On Mon, 2 Feb 2009 09:35:13 +0100, Laurent Aimar <fenrir at via.ecp.fr> wrote:
> >> This crash occurs whereby an MPEG-PS file exhibits a .mod extension.
> >> Changing priorities will not fix the problem.
> >  It will in most cases:
> >  The PS demuxer has 2 priorities, one when the begin of the file look
> like
> > valid PS and one that will always accept the file (default fallback).
> >  So if the file looks like PS and the PS demuxer has a higher priority
> > over mod, it will be chosen instead.
> Is it not so that, when the extension is "known", the input code will
> automatically force a demux, and _then_ fallback to probing?
 That's configurable.
 A set of recognized extensions are in src/input/demux.c

> As far as I can tell, if a file matches *.mod, we will always try
> libmodplug _first_, before anything else, including the "high priority" PS
> detection.
 And you are right, .mod is in there. But that can be changed.
> >  It will not fix any problem with broken PS (ie that does not have valid
> > header at the begining).
> Sure.
> (...)
> >  We can try to make the mod plugin detection more robust. Is there anyone
> > that have informations on mod file format ?
> MOD file format per se is well documented. But there are 5 different
> trackers format, and I believe libmodplug understands several of these. MOD
> is just one of them. But what is the point? First, it will still crash if
> we have a corrupt file with a valid header anyway. Secondly, we will loose
> support for any tracker file that the VLC modplug plugin does not know,
> whereas libmodplug would.
 We could (try to) add robust detection for all supported mod formats.
 -> No invalid detection on non mod file
 -> Detection of mod file independantly of extension.
Even for a subtset of it, it would be better (more robust).

> IMNSHO, whoever cares really ought to fix libmodplug directly, or write a
 Fixing libmodplug library is of course better for robustness but a better detection
on VLC side would not be bad either.


More information about the vlc-devel mailing list