[FFmpeg-devel] [PATCH] rl2 format demuxer

Michael Niedermayer michaelni
Fri Mar 21 14:11:13 CET 2008


On Fri, Mar 21, 2008 at 01:31:08PM +0100, Sascha Sommer wrote:
[...]
> >
> > [...]
> >
> > > +AVInputFormat rl2_demuxer = {
> > > +    "rl2",
> > > +    "rl2 format",
> > > +    sizeof(Rl2DemuxContext),
> > > +    rl2_probe,
> > > +    rl2_read_header,
> > > +    rl2_read_packet,
> > > +};
> >
> > What about adding seeking support? :)
> >
> 
> What a surprising question ;)

Well iam just trying to squeeze as much usefull code out of the students as
possible before googles deadline, can i maybe convince you to do another
2 or 3 qualification tasks or maybe write a gcc or firefox replacement? ;)


[...]

> +/**
> + * read rl2 header data and setup the avstreams
> + * @param s demuxer context
> + * @param ap format parameters
> + * @return 0 on success, AVERROR otherwise
> + */
> +static int rl2_read_header(AVFormatContext *s,
> +                            AVFormatParameters *ap)
> +{

Functions which are called just once in a demuxers life should be marked
as av_cold


[...]

> +                    av_rescale(timestamp, st2->time_base.den*(int64_t)st->time_base.num,
> +                                   st->time_base.den * (int64_t)st2->time_base.num),

see av_rescale_q()

patch ok except above

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

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- 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/20080321/0d08f02d/attachment.pgp>



More information about the ffmpeg-devel mailing list