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

Måns Rullgård mans
Mon Feb 2 11:22:50 CET 2009


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?

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list