[FFmpeg-cvslog] sanm: remove code duplication

Paul B Mahol git at videolan.org
Thu Jul 5 01:42:21 CEST 2012


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Jul  4 17:45:13 2012 +0000| [1f9bc3104afd98054c1b0f7b407e8791436c8aa0] | committer: Paul B Mahol

sanm: remove code duplication

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

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

 libavcodec/sanm.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavcodec/sanm.c b/libavcodec/sanm.c
index 3a73416..2b548f2 100644
--- a/libavcodec/sanm.c
+++ b/libavcodec/sanm.c
@@ -480,9 +480,8 @@ static int old_codec37(SANMVideoContext *ctx, int top,
                         if (compr == 4 && !code) {
                             if (bytestream2_get_bytes_left(&ctx->gb) < 1)
                                 return AVERROR_INVALIDDATA;
-                            skip_run = bytestream2_get_byteu(&ctx->gb);
-                            for (k = 0; k < 4; k++)
-                                memcpy(dst + i + k * stride, prev + i + k * stride, 4);
+                            skip_run = bytestream2_get_byteu(&ctx->gb) + 1;
+                            i -= 4;
                         } else {
                             int mx, my;
 



More information about the ffmpeg-cvslog mailing list