libpostproc: fix leak of 2kb

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2012-12-23 04:48:36 +01:00
parent ca9eb9305a
commit f9d8658d67

View File

@@ -381,11 +381,10 @@ static inline void doHorizLowPass_C(uint8_t dst[], int stride, const PPContext *
static inline void horizX1Filter(uint8_t *src, int stride, int QP) static inline void horizX1Filter(uint8_t *src, int stride, int QP)
{ {
int y; int y;
static uint64_t *lut= NULL; static uint64_t lut[256];
if(lut==NULL) if(!lut[255])
{ {
int i; int i;
lut = av_malloc(256*8);
for(i=0; i<256; i++) for(i=0; i<256; i++)
{ {
int v= i < 128 ? 2*i : 2*(i-256); int v= i < 128 ? 2*i : 2*(i-256);