summaryrefslogtreecommitdiff
path: root/libavcodec/dvbsubdec.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-08-20 18:54:50 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-08-20 18:54:50 +0000
commit29d7eef7dcfaf6cc6c97ac154e54c89f77507d86 (patch)
tree018a1dda8b58075ed8149ae8cc419bef8ec82307 /libavcodec/dvbsubdec.c
parent1b03a9d6073b3a4c62a44b56852762eb4b382dc4 (diff)
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
Diffstat (limited to 'libavcodec/dvbsubdec.c')
-rw-r--r--libavcodec/dvbsubdec.c2
1 files changed, 1 insertions, 1 deletions
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);