aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/aviobuf.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-10-12 16:36:48 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-10-12 16:36:48 +0000
commit098d8e0950d6efbfb628b612f45df45b3c2d7b05 (patch)
treea93b3d2b447f9069ec78b0ebbc874fe35db597e3 /libavformat/aviobuf.c
parentb5ca9cd36fbfbbac95396c12e8e2d1e01cd7039f (diff)
downloadffmpeg-098d8e0950d6efbfb628b612f45df45b3c2d7b05.tar.gz
Simplify: use FFMIN
Originally committed as revision 20213 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r--libavformat/aviobuf.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index c670d48c98..dd6f9b6c95 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;