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

Reimar Döffinger Reimar.Doeffinger
Mon Feb 2 11:07:08 CET 2009


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.




More information about the ffmpeg-devel mailing list