[SCM] libav/experimental: Only memset for palettes of 16 elements.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:53:36 UTC 2013


The following commit has been merged in the experimental branch:
commit 25b6d0bc697abce3c2584205ce6efc592cfe3aec
Author: Benoit Fouet <benoit.fouet at free.fr>
Date:   Tue Oct 27 15:04:35 2009 +0000

    Only memset for palettes of 16 elements.
    
    Originally committed as revision 20377 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/pcx.c b/libavcodec/pcx.c
index df6a8aa..51c9acf 100644
--- a/libavcodec/pcx.c
+++ b/libavcodec/pcx.c
@@ -71,6 +71,7 @@ static void pcx_palette(const uint8_t **src, uint32_t *dst, unsigned int pallen)
 
     for (i=0; i<pallen; i++)
         *dst++ = bytestream_get_be24(src);
+    if (pallen < 256)
     memset(dst, 0, (256 - pallen) * sizeof(*dst));
 }
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list