[Ffmpeg-devel] Contacting developers by subversion name

Måns Rullgård mru
Fri Dec 29 20:21:27 CET 2006


Don't top-post.

"Paul Richards" <paul.richards at gmail.com> writes:

> On 29/12/06, M?ns Rullg?rd <mru at inprovide.com> wrote:
>> "Paul Richards" <paul.richards at gmail.com> writes:
>>
>> > Hi,
>> > Apologies for spamming the mailing list.  Is there an easy way to
>> > contact a developer given their subversion name?
>> >
>> > I am attempting to implement an output codec, and I am using other
>> > codecs for reference (in this case oggvorbis.c).  I am currently
>> > looking to contact "mru", or anyone familiar with oggvorbis.c.
>>
>> That would be me, but I'm afraid I'm no more familiar with oggvorbis.c
>> than anyone.  I didn't write it, and I'm not the maintainer of it.
>>
>> Just say what you need to know, and we'll probably try to tell you.
>
> I'm looking from line 104 onwards.  At this part the various
> ogg_packet structs are being packed together into the AVCodecContext's
> extradata fields.  There is some magic happening that I don't follow:
>
> len = header.bytes + header_comm.bytes +  header_code.bytes;
> avccontext->extradata_size= 64 + len + len/255;
> p = avccontext->extradata= av_mallocz(avccontext->extradata_size);
> p[0] = 2;
> offset = 1;
> offset += av_xiphlacing(&p[offset], header.bytes);
> offset += av_xiphlacing(&p[offset], header_comm.bytes);
> memcpy(&p[offset], header.packet, header.bytes);
> offset += header.bytes;
> memcpy(&p[offset], header_comm.packet, header_comm.bytes);
> offset += header_comm.bytes;
> memcpy(&p[offset], header_code.packet, header_code.bytes);
> offset += header_code.bytes;
> avccontext->extradata_size = offset;
> avccontext->extradata= av_realloc(avccontext->extradata,
> avccontext->extradata_size);
>
> Can the "64 + len + len / 255" expression be explained?  I see that
> the buffer is later reduced in size based on the actual value for
> offset.  Is this expression simply something which is guessed to be
> "large enough"?

That's right.

> Can the "p[0] = 2" be explained?

The first byte is followed by 2 xiph-coded values.

> What does av_xiphlacing do?  It has no documentation that I can find.

It has source code.

Do yourself a favor and keep away from the xiph brain damage.  What
are you trying to accomplish?

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-devel mailing list