aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/xsubdec.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/xsubdec.c
parent1b03a9d6073b3a4c62a44b56852762eb4b382dc4 (diff)
downloadffmpeg-29d7eef7dcfaf6cc6c97ac154e54c89f77507d86.tar.gz
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/xsubdec.c')
-rw-r--r--libavcodec/xsubdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/xsubdec.c b/libavcodec/xsubdec.c
index 3838722c1f..368caf4a6d 100644
--- a/libavcodec/xsubdec.c
+++ b/libavcodec/xsubdec.c
@@ -95,7 +95,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
sub->rects[0]->pict.linesize[0] = w;
sub->rects[0]->pict.data[0] = av_malloc(w * h);
sub->rects[0]->nb_colors = 4;
- sub->rects[0]->pict.data[1] = av_malloc(sub->rects[0]->nb_colors * 4);
+ sub->rects[0]->pict.data[1] = av_mallocz(AVPALETTE_SIZE);
// read palette
for (i = 0; i < sub->rects[0]->nb_colors; i++)