# HG changeset patch # User cehoyos # Date 1251286297 0 # Node ID e85fbfe709d8c66aef00b3171244b911dc977e6b # Parent 8e1fbf9b08585942619b050a90ad454fabf2d711 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 diff -r 8e1fbf9b0858 -r e85fbfe709d8 pgssubdec.c --- 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));