From 29d7eef7dcfaf6cc6c97ac154e54c89f77507d86 Mon Sep 17 00:00:00 2001 From: Reimar Döffinger Date: Thu, 20 Aug 2009 18:54:50 +0000 Subject: 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. Originally committed as revision 19673 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/dvbsubdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/dvbsubdec.c') diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c index fb09740c2b..b810ef9e49 100644 --- a/libavcodec/dvbsubdec.c +++ b/libavcodec/dvbsubdec.c @@ -1314,7 +1314,7 @@ static int dvbsub_display_end_segment(AVCodecContext *avctx, const uint8_t *buf, 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); -- cgit v1.2.3