[FFmpeg-devel] [PATCH] IVF demuxer

Diego Biurrun diego
Fri May 21 09:36:29 CEST 2010


On Thu, May 20, 2010 at 09:26:23PM -0400, David Conrad wrote:
> 
> commit 64aa600ee2cbc716061b38feeb2072a0d67c6789
> Author: David Conrad <lessen42 at gmail.com>
> Date:   Thu May 20 17:37:39 2010 -0400
> 
>     Indeo Video File demuxer

Docs and changelog and version bump missing, don't forget that
when committing.

> --- /dev/null
> +++ b/libavformat/ivfdec.c
> @@ -0,0 +1,83 @@
> +
> +    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);
> +    st->duration = get_le64(s->pb) * av_q2d(st->time_base);

align

> +    st->codec->time_base = st->time_base;
> +    st->need_parsing = AVSTREAM_PARSE_HEADERS;

align

> +static int read_packet(AVFormatContext *s, AVPacket *pkt)
> +{
> +    int ret, size = get_le32(s->pb);
> +    int64_t pts = get_le64(s->pb);

align

> +
> +    ret = av_get_packet(s->pb, pkt, size);
> +    pkt->stream_index = 0;
> +    pkt->pts = pts;

align

Diego



More information about the ffmpeg-devel mailing list