[MPlayer-dev-eng] [PATCH] prefer lavf pva and lmlm4 demuxers

Ivo ivop at euronet.nl
Tue Jun 3 22:35:41 CEST 2008


On Tuesday 03 June 2008 22:04, Reimar Döffinger wrote:
> On Tue, Jun 03, 2008 at 09:25:46PM +0200, Ivo wrote:
> > On Tuesday 03 June 2008 20:21, Reimar Döffinger wrote:
> > > On Tue, Jun 03, 2008 at 07:14:08PM +0200, Ivo wrote:
> > > > > I am not sure if there is a native alternative to these, so the
> > > > > real criteria is: If you are sure that the auto-detection of
> > > > > these formats is (almost) 100% reliable.
> > > >
> > > > I have been fairly cautious with the probe functions. lmlm4's probe
> > > > function returns either AVPROBE_SCORE_MAX/2 or 0 and pva returns
> > > > either AVPROBE_SCORE_MAX/3, /5 or 0.
> > >
> > > That you used AVPROBE_SCORE_MAX/2 and similar is more a reason for
> > > concern, since that would indicate that the autodetection is _not_
> > > reliable. And a score of "only" AVPROBE_SCORE_MAX/2 helps nothing at
> > > all if the format is not one recognized by avformat, then anything >
> > > 0 has exactly the same effect.
> > > If you only want to make them default over the internal ones, you can
> > > just move the native ones lower in the demuxer list.
> >
> > I see. That'll work for LMLM4 (at least with the sample files) but it
> > fails with PVA files. Those get misdetected as MPEG-ES by MPlayer.
> >
> > How should I proceed?
>
> Ideally: Fix MPEG-ES detection by native demuxer ;-).

Well, I actually tried to look into it, and found out that the line where it 
gets set is in libmpdemux/demux_mpg.c:

file_format=DEMUXER_TYPE_MPEG_ES; //  <-- hack is here :)

That comment made me suspicious. svn blame said it was by nicodvb, but 
tracking it back in time led to libmpdemux/demuxer.c, mplayerHQ.c all the 
way back to mplayer.c at r2 (!) and:

$ svn blame mplayer.c | grep "hack is here"
     2   arpi_esp       file_format=DEMUXER_TYPE_MPEG_ES; //  <-- hack is 
here :)

Perhaps I can understand what the hack is actually about by looking over 
this seven year old code :)

--Ivo



More information about the MPlayer-dev-eng mailing list