[FFmpeg-devel] [PATCH] ACT demuxer
Vladimir Voroshilov
voroshil
Mon Feb 25 18:01:55 CET 2008
Hi, Michael
On Mon, Feb 25, 2008 at 6:41 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Mon, Feb 25, 2008 at 01:16:48PM +0600, Vladimir Voroshilov wrote:
> > Hi, Michael
> >
> > On Mon, Feb 25, 2008 at 12:36 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> >
> > > [...]
> >
> > > > +{
> > > > + int score=0;
> > >
> > > > +
> > > > + if ((AV_RL32(&p->buf[0]) != RIFF_TAG) ||
> > > > + (AV_RL32(&p->buf[8]) != WAVE_TAG) ||
> > > > + (AV_RL32(&p->buf[16]) != 16))
> > > > + return 0;
> > > > +
> > >
> > > > + if(match_ext(p->filename, "act"))
> > > > + score=AVPROBE_SCORE_MAX/4;
> > >
> > > iam against this, if detection is done based on the filename
> > > then theres no need for act_probe()
> > >
Filename check removed
> [...]
> > 3. bytes 44-256 and 264-511 are filled by zero (not reliable too)
>
> Do you have an act file which contains non zero bytes there? If not these
> could be checked as well.
Never seen such files.
> > 4. the rest are 512 bytes long chunks with 2 of 6 zero-filled padding
> > data at the end (unable to differ from WAV data).
> >
> > So there is no reliable method for format detection.
> > We always can create correct WAV file which will look like ACT
>
> Yes, but luckily we dont need a 100% reliable check, we just need one
> which is sufficiently reliable, checking 2 bytes where one (the size) has
> a very high chance of matching a valid wav, could easily lead to
> 1 misdetectionsin in 1000.
> Checking 10 bytes would if half of them are random give better than
> 1 misdetection in 2^40.
If attached version better?
It also checks zero bytes after WAV header and after ACT
data at the middle of header.
av_set_pts fixed as suggested by you.
4400 format disabled until sample file of info from disassembled code
will be available.
--
Regards,
Vladimir Voroshilov mailto:voroshil at gmail.com
JID: voroshil at gmail.com, voroshil at jabber.ru
ICQ: 95587719
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: act_04.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080225/83a56a6e/attachment.asc>
More information about the ffmpeg-devel
mailing list