[SCM] libav/experimental: Simplify: use FFMIN

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:52:47 UTC 2013


The following commit has been merged in the experimental branch:
commit 098d8e0950d6efbfb628b612f45df45b3c2d7b05
Author: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
Date:   Mon Oct 12 16:36:48 2009 +0000

    Simplify: use FFMIN
    
    Originally committed as revision 20213 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index c670d48..dd6f9b6 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -107,9 +107,7 @@ void put_buffer(ByteIOContext *s, const unsigned char *buf, int size)
     int len;
 
     while (size > 0) {
-        len = (s->buf_end - s->buf_ptr);
-        if (len > size)
-            len = size;
+        len = FFMIN(s->buf_end - s->buf_ptr, size);
         memcpy(s->buf_ptr, buf, len);
         s->buf_ptr += len;
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list