[FFmpeg-devel] [PATCH] rl.h: Allocate temporary VLC tables instead of having them static.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Sep 1 09:32:56 CEST 2014


On 01.09.2014, at 02:35, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Sun, Aug 31, 2014 at 08:27:17PM +0200, Reimar Döffinger wrote:
>> 
>> {
>>     int i, q;
>> +    VLC vlc;
> 
>> +    init_vlc(&vlc, 9, rl->n + 1, &rl->table_vlc[0][1], 4, 2, &rl->table_vlc[0][0], 4, 2, 0);
> 
> same issue here
> 
> why do you change the code to dynamically allocate ?

Because it ends up using and wasting memory for nothing at runtime if you leave it static.
And the size is a bit too large to do it on-stack I think.



More information about the ffmpeg-devel mailing list