[FFmpeg-devel] [PATCH] WebM mux/demux

Michael Niedermayer michaelni
Thu May 20 00:13:35 CEST 2010


On Wed, May 19, 2010 at 05:10:32PM -0400, David Conrad wrote:
> On May 19, 2010, at 3:47 PM, Michael Niedermayer wrote:
> 
> > On Wed, May 19, 2010 at 03:42:12PM -0400, Ronald S. Bultje wrote:
> >> Hi,
> >> 
> >> On Wed, May 19, 2010 at 3:38 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> >>> On Wed, May 19, 2010 at 03:27:22PM -0400, Ronald S. Bultje wrote:
> >>>> On Wed, May 19, 2010 at 3:14 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> >>>>> On Wed, May 19, 2010 at 03:05:30PM -0400, David Conrad wrote:
> >>>>>> -    /* The header must contain the document type 'matroska'. For now,
> >>>>>> +    /* The header must contain a known document type. For now,
> >>>>>>       * we don't parse the whole header but simply check for the
> >>>>>>       * availability of that array of characters inside the header.
> >>>>>>       * Not fully fool-proof, but good enough. */
> >>>>>> -    for (n = 4+size; n <= 4+size+total-(sizeof(probe_data)-1); n++)
> >>>>>> -        if (!memcmp(p->buf+n, probe_data, sizeof(probe_data)-1))
> >>>>>> -            return AVPROBE_SCORE_MAX;
> >>>>>> +    for (i = 0; i < FF_ARRAY_ELEMS(matroska_doctypes); i++)
> >>>>>> +        for (n = 4+size; n <= 4+size+total-(strlen(matroska_doctypes[i])-1); n++)
> >>>>>> +            if (!memcmp(p->buf+n, probe_data, strlen(matroska_doctypes[i])-1))
> >>>>>> +                return AVPROBE_SCORE_MAX;
> >>>>>> 
> >>>>>>      return 0;
> >>>>>>  }
> >>>>> 
> >>>>> it would be more future proof if we didnt check this string at all (as long
> >>>>> as reliable detection is still possible of course)
> >>>> 
> >>>> That would fail if someone creates an EMBL-based, but
> >>>> matroska-incompatible format (e.g. matroska2).
> >>> 
> >>> such format would fail with svn, with my suggestion and with any of
> >>> the patches posted. So no real difference except that with my suggestion
> >>> it would be detected as matroska while the others might detect it as
> >>> ac3 or mp3 with low score
> >> 
> >> True, I was thinking though that you'd prefer to decrease false
> >> positives, not add to it... But either way is fine with me of course.
> > 
> > we could print a "warning unknown doctype blah blah this might fail"
> > 
> > and false positive it is only if we have a matroska2 demuxer implemented
> > completely seperately otherwise detecting it as matroska is more correct.
> 
> Like so?

yes

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100520/b54c5aad/attachment.pgp>



More information about the ffmpeg-devel mailing list