[vlc-devel] [VLC] #2468: VLC 0.9.8a crahes when opening a mpeg2-file with .mod-extension.
fenrir at via.ecp.fr
Mon Feb 2 09:35:13 CET 2009
On Mon, Feb 02, 2009, Rémi Denis-Courmont wrote:
> On Sun, 1 Feb 2009 19:55:28 +0100, Laurent Aimar <fenrir at via.ecp.fr> wrote:
> >> Blah, even mplayer is doing better job and not trying interpret files
> >> by extensions but the data inside.
> >> It's does not matter is it a libmodplug bug or not, VLC should not
> >> crash to 3rd party bug when it could just feed the file to correct
> >> demuxer instead of doing "the file extensions are cool". Whatever..
> > VLC tries first to detect content ignoring extension, and fall back
> > to extension when it cannot.
> > One of the problem, is that PS is hard to detect in a reliable way, and
> > that mod demuxer only check extensions...
> > Now, mod demuxer has a priority of 10, the automatic PS dectection has a
> > priority of 8.
> > Does anyone know if the priority of mod can be decreased below (<) 8 ?
> > (I would avoid increasing PS because of lot of demuxers use 10).
> 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.
It will not fix any problem with broken PS (ie that does not have valid
header at the begining).
> As far as I understand, we
> would have to remove the .mod extension from the list of known extensions
> to "fix" this. libmodplug is too stupid to handle malformatted files. There
> is really not much we can do about that. People who care can simply not
> build the modplug plugin, or fix upstream.
We can try to make the mod plugin detection more robust. Is there anyone
that have informations on mod file format ?
> Aside, I suspect decreasing priority below that of PS, will cause the
> "promiscuous" PS demux to claim genuine tracker imputs.
It can if the mod first 4 bytes look like PS (as there is 2 priorities
for the PS demuxer).
More information about the vlc-devel