[FFmpeg-devel] [PATCH 3/7] dvdsubdec: fix uninitialized colormap warning.

Michael Niedermayer michaelni at gmx.at
Sat Sep 3 02:27:03 CEST 2011


On Thu, Sep 01, 2011 at 02:30:20AM +0200, Clément Bœsch wrote:
> ---
>  libavcodec/dvdsubdec.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
> index 1c3d75e..60bd86f 100644
> --- a/libavcodec/dvdsubdec.c
> +++ b/libavcodec/dvdsubdec.c
> @@ -174,7 +174,7 @@ static int decode_dvd_subtitles(AVSubtitle *sub_header,
>      int cmd_pos, pos, cmd, x1, y1, x2, y2, offset1, offset2, next_cmd_pos;
>      int big_offsets, offset_size, is_8bit = 0;
>      const uint8_t *yuv_palette = 0;
> -    uint8_t colormap[4], alpha[256];
> +    uint8_t colormap[4] = {0}, alpha[256];

iam not sure that 0 is a good fallback otherwise LGTM

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110903/1a9fb7ed/attachment.asc>


More information about the ffmpeg-devel mailing list