Mercurial > libavcodec.hg
changeset 10092:e85fbfe709d8 libavcodec
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
author | cehoyos |
---|---|
date | Wed, 26 Aug 2009 11:31:37 +0000 |
parents | 8e1fbf9b0858 |
children | beb616cf1885 |
files | pgssubdec.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/pgssubdec.c Wed Aug 26 10:08:00 2009 +0000 +++ b/pgssubdec.c Wed Aug 26 11:31:37 2009 +0000 @@ -367,7 +367,7 @@ /* 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));