[FFmpeg-devel] [PATCH] IVF demuxer

Michael Niedermayer michaelni
Sun May 23 11:27:46 CEST 2010


On Fri, May 21, 2010 at 07:15:25PM -0400, David Conrad wrote:
[...]
> +
> +static int read_header(AVFormatContext *s, AVFormatParameters *ap)
> +{
> +    AVStream *st;
> +
> +    get_le32(s->pb); // DKIF
> +    get_le16(s->pb); // version
> +    get_le16(s->pb); // header size
> +
> +    st = av_new_stream(s, 0);
> +    if (!st)
> +        return AVERROR(ENOMEM);
> +
> +    av_set_pts_info(st, 64, 1, 90000);
> +
> +    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
> +    st->codec->codec_tag  = get_le32(s->pb);
> +    st->codec->codec_id   = ff_codec_get_id(ff_codec_bmp_tags, st->codec->codec_tag);
> +    st->codec->width      = get_le16(s->pb);
> +    st->codec->height     = get_le16(s->pb);

> +    st->time_base.den     = get_le32(s->pb);
> +    st->time_base.num     = get_le32(s->pb);

these shold be set through av_set_pts_info()


[...]
> +AVInputFormat ivf_demuxer = {
> +    "ivf",
> +    NULL_IF_CONFIG_SMALL("On2 IVF"),
> +    0,
> +    probe,
> +    read_header,
> +    read_packet,
> +    .flags= AVFMT_GENERIC_INDEX,

codec_tag should be set too

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

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- 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/20100523/35572ab0/attachment.pgp>



More information about the ffmpeg-devel mailing list