diff dvbsubdec.c @ 10069:8ac9bc10b485 libavcodec

Always allocate a buffer of AVPALETTE_SIZE for palette in the subtitle decoders instead of as small as possible. This avoids completely unnecessary issues with e.g. libswscale.
author reimar
date Thu, 20 Aug 2009 18:54:50 +0000
parents c78fd9154378
children 8a4984c5cacc
line wrap: on
line diff
--- a/dvbsubdec.c	Wed Aug 19 21:59:44 2009 +0000
+++ b/dvbsubdec.c	Thu Aug 20 18:54:50 2009 +0000
@@ -1314,7 +1314,7 @@
             break;
         }
 
-        rect->pict.data[1] = av_malloc((1 << region->depth) * sizeof(uint32_t));
+        rect->pict.data[1] = av_mallocz(AVPALETTE_SIZE);
         memcpy(rect->pict.data[1], clut_table, (1 << region->depth) * sizeof(uint32_t));
 
         rect->pict.data[0] = av_malloc(region->buf_size);