[FFmpeg-cvslog] msrledec: use memset()

Paul B Mahol git at videolan.org
Mon Aug 26 21:26:54 CEST 2013


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Aug 26 15:41:29 2013 +0000| [e6e26b8a916fb582a1039f5b894c2929d8fa5f05] | committer: Paul B Mahol

msrledec: use memset()

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e6e26b8a916fb582a1039f5b894c2929d8fa5f05
---

 libavcodec/msrledec.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/msrledec.c b/libavcodec/msrledec.c
index 06777d7..4d3da5b 100644
--- a/libavcodec/msrledec.c
+++ b/libavcodec/msrledec.c
@@ -211,8 +211,8 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic,
             switch(depth){
             case  8:
                 pix[0] = bytestream2_get_byte(gb);
-                for(i = 0; i < p1; i++)
-                        *output++ = pix[0];
+                memset(output, pix[0], p1);
+                output += p1;
                 break;
             case 16:
                 pix16  = bytestream2_get_le16(gb);



More information about the ffmpeg-cvslog mailing list