[FFmpeg-devel] [PATCH] probetest.c

Ivo ivop
Tue Sep 22 20:35:12 CEST 2009

On Tuesday 22 September 2009 17:52, Michael Niedermayer wrote:
> On Tue, Sep 22, 2009 at 03:08:41AM +0200, Ivo wrote:
> > On Tuesday 15 September 2009 19:39, Vitor Sessak wrote:
> > > pva
> >
> > I checked it, and I actually use return AVPROBE_SCORE_MAX/2 exactly for
> > the reason to avoid misdetections. I could lower it to /3 though if
> > that's wanted.
> cant you check more bytes?
> > > Others weak probes:
> >
> > [..]
> >
> > > lmlm4
> >
> > This one returns either /3 or /5 depending on "how much" it finds.
> same ...

Sadly not really. Both are are near-raw formats, encapsulating an MPEG 
stream. pva.c checks five bytes of which three must be identical, one 
non-zero and one less than three. LMLM4 has no header at all and probe  
checks whether the the first few bytes look like a valid LMLM4 packet and 
after that checks whether the packet contains something MPEG like 
(v&0xfffe==0xfffc return MAX/3 or a PES signal, return MAX/5). Both file 
formats are easily mistaken for mpeg streams, that's why I chose the values 
to be low as there's not much else to check and be sure.

Hmm, I could check if there's a second packet at the end of the first. How 
large is the probebuffer? Perhaps I could even keep checking till the end 
of the probebuffer.


More information about the ffmpeg-devel mailing list