[FFmpeg-devel] [PATCH] dnxhd parser and raw de/muxer
Stuart Cunningham
stuartc
Tue Sep 16 04:50:57 CEST 2008
On Mon, 2008-09-15 at 20:40 +0200, Michael Niedermayer wrote:
> On Mon, Sep 15, 2008 at 10:58:06AM -0700, Baptiste Coudurier wrote:
> > Hi,
> >
> > Michael Niedermayer wrote:
> > > On Mon, Sep 08, 2008 at 02:54:14PM -0700, Baptiste Coudurier wrote:
> > >> Hi,
> > >>
> > >> $subject, to use dnxhd raw essences.
> > > [...]
> > >> Index: libavformat/raw.c
> > >> ===================================================================
> > >> --- libavformat/raw.c (revision 15275)
> > >> +++ libavformat/raw.c (working copy)
> > >> @@ -487,6 +487,15 @@
> > >> }
> > >> #endif
> > >>
> > >> +static int dnxhd_probe(AVProbeData *p)
> > >> +{
> > >> + static const uint8_t header[] = {0x00,0x00,0x02,0x80,0x01};
> > >> + if (!memcmp(p->buf, header, 5))
> > >> + return AVPROBE_SCORE_MAX;
> > >> + else
> > >> + return 0;
> > >> +}
> > >
> > > Can more than that be used for a more reliable probe?
> > > I mean yes its 5 bytes but they are all 0 except 3 bits, thus this might
> > > be more common in real files than expected in random data.
> >
[...]
> > Besides, after these 5 bytes, I'd need to go far to fetch interesting
> > data like cid, Im not sure.
>
> well its not that important, we can always leave it until someone actually
> finds some misdetection. I wasnt aware that these 5 bytes where the only
> easy checkable thing ...
>
There's the 32bit end-of-frame marker 0x600DC0DE but that's probably not
helpful here, but might be useful in the dnxhd_find_frame_end() function
of libavcodec/dnxhd_parser.c (also part of the patch).
Stuart Cunningham
More information about the ffmpeg-devel
mailing list