[FFmpeg-devel] [RFC] Public API for RC4 and DES

Michael Niedermayer michaelni
Mon Feb 2 11:52:32 CET 2009


On Mon, Feb 02, 2009 at 10:22:50AM +0000, M?ns Rullg?rd wrote:
> Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> writes:
> 
> > On Mon, Feb 02, 2009 at 10:59:16AM +0100, Marc Mason wrote:
> >> Then, why not just declare rc4 on the stack, and pass its address?
> >> 
> >> struct AVRC4 rc4;
> >> [...]
> >> /* rc4 = av_malloc(av_rc4_size); UNNECESSARY */
> >> /* pass &rc4 around */
> >> [...]
> >> /* av_free(rc4); UNNECESSARY */
> >> 
> >> I must be missing something?
> >
> > You miss that the size of struct AVRC4 is not known to the compiler.
> 
> Why is the interface done in such a twisted way?

so the struct can be changed without breaking ABI

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090202/264e3b10/attachment.pgp>



More information about the ffmpeg-devel mailing list