diff options
author | Stephen Backway <stev391@exemail.com.au> | 2009-08-26 11:31:37 +0000 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2009-08-26 11:31:37 +0000 |
commit | 4a3178b0127e649a507c2d3b45fa16865ad93580 (patch) | |
tree | 70ad2696dca849e91de2319dd44008b57188be47 /libavcodec/pgssubdec.c | |
parent | 7f4fca038dc8f3309be331c8c8f57f03e71c9f42 (diff) | |
download | ffmpeg-4a3178b0127e649a507c2d3b45fa16865ad93580.tar.gz |
Always allocate a buffer of AVPALETTE_SIZE for palette in the
Bluray subtitle decoder instead of as small as possible.
This avoids completely unnecessary issues with e.g. libswscale.
(See r19673)
Patch by Stephen Backway, stev391 A exemail D com D au
Originally committed as revision 19714 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/pgssubdec.c')
-rw-r--r-- | libavcodec/pgssubdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c index 275f45a3b5..5041d3a3d9 100644 --- a/libavcodec/pgssubdec.c +++ b/libavcodec/pgssubdec.c @@ -367,7 +367,7 @@ static int display_end_segment(AVCodecContext *avctx, void *data, /* Allocate memory for colors */ sub->rects[0]->nb_colors = 256; - sub->rects[0]->pict.data[1] = av_malloc(sub->rects[0]->nb_colors * sizeof(uint32_t)); + sub->rects[0]->pict.data[1] = av_mallocz(AVPALETTE_SIZE); memcpy(sub->rects[0]->pict.data[1], ctx->clut, sub->rects[0]->nb_colors * sizeof(uint32_t)); |