[FFmpeg-devel] [PATCH] R3D REDCODE demuxer
Baptiste Coudurier
baptiste.coudurier
Mon Jan 19 02:42:36 CET 2009
Hi Michael,
Michael Niedermayer wrote:
>> [...]
>>
>> Updated patch attached.
> [...]
>> +typedef struct {
>
>> + unsigned video_offsets_count;
>> + unsigned *video_offsets;
>
> It may be simpler to use the avindex functions though then it would
> eat more mem&cpu so its maybe a poor suggestion and the current code is
> better, just wanted to mention it ...
Yes I believe so.
>> + unsigned rdvo_offset;
>
>> + int timescale;
>
> this contains the same value as AVStream.time_base thus it seems redundant
Ok
>> + AVRational frame_rate;
>
> cant AVCodecContext.time_base be used ?
Ok
>> + int major, minor; ///< version
>
> practically unused
Removed, will reintroduce when other variant will be found.
>> [...]
>> +
>> + st->filename = av_mallocz(258);
>> + if (!st->filename)
>> + return AVERROR(ENOMEM);
>> + get_buffer(s->pb, st->filename, 257);
>> + dprintf(s, "filename %s\n", st->filename);
>
> it might be cleaner to merge all the dprintf() and put them at the end of
> each function
Ok, factorized some debug print.
> [...]
>> +static int r3d_read_reos(AVFormatContext *s)
>> +{
>> + R3DContext *r3d = s->priv_data;
>> + int tmp;
>> +
>> + r3d->rdvo_offset = get_be32(s->pb);
>> + get_be32(s->pb); // rdvs offset
>> + get_be32(s->pb); // rdao offset
>> + get_be32(s->pb); // rdas offset
>> +
>> + tmp = get_be32(s->pb);
>> + dprintf(s, "num video chunks %d\n", tmp);
>> +
>> + tmp = get_be32(s->pb);
>> + dprintf(s, "num audio chunks %d\n", tmp);
>> +
>> + url_fskip(s->pb, 6*4);
>> + return 0;
>> +}
>
> always returns 0 thus doesnt need to return anything yet
Changed.
Thanks for the review. Updated patch attached.
--
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
checking for life_signs in -lkenny... no
-------------- next part --------------
A non-text attachment was scrubbed...
Name: r3d_demuxer3.patch
Type: text/x-diff
Size: 13162 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090118/ed89b945/attachment.patch>
More information about the ffmpeg-devel
mailing list