[Ffmpeg-devel] Contacting developers by subversion name

Paul Richards paul.richards
Fri Dec 29 19:42:40 CET 2006

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,

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"?

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

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

Thanks. :)

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.
> --
> M?ns Rullg?rd
> mru at inprovide.com
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel

Paul Richards

More information about the ffmpeg-devel mailing list