[FFmpeg-devel] [PATCH] IVF demuxer
David Conrad
lessen42
Thu May 27 08:02:37 CEST 2010
On May 23, 2010, at 5:27 AM, Michael Niedermayer wrote:
> 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()
Fixed
> [...]
>> +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
Fixed
Forgotten documentation added
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: textmate stdin iYHWrb.txt
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100527/e7b9bf60/attachment.txt>
More information about the ffmpeg-devel
mailing list