[FFmpeg-cvslog] r20213 - trunk/libavformat/aviobuf.c

reimar subversion
Mon Oct 12 18:36:48 CEST 2009


Author: reimar
Date: Mon Oct 12 18:36:48 2009
New Revision: 20213

Log:
Simplify: use FFMIN

Modified:
   trunk/libavformat/aviobuf.c

Modified: trunk/libavformat/aviobuf.c
==============================================================================
--- trunk/libavformat/aviobuf.c	Mon Oct 12 16:46:53 2009	(r20212)
+++ trunk/libavformat/aviobuf.c	Mon Oct 12 18:36:48 2009	(r20213)
@@ -107,9 +107,7 @@ void put_buffer(ByteIOContext *s, const 
     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;
 



More information about the ffmpeg-cvslog mailing list