[FFmpeg-devel] [PATCH] IVF demuxer

David Conrad lessen42
Thu May 27 23:24:08 CEST 2010


On May 27, 2010, at 11:04 AM, Michael Niedermayer wrote:

> On Thu, May 27, 2010 at 02:02:37AM -0400, David Conrad wrote:
>> 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
>> 
> 
>> commit 93cb5cb2e123114150249ddca5bc0d45488fbefc
>> Author: David Conrad <lessen42 at gmail.com>
>> Date:   Thu May 20 17:37:39 2010 -0400
>> 
>>    On2 IVF demuxer
> 
> looks ok

Applied



More information about the ffmpeg-devel mailing list