diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-10-12 16:36:48 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-10-12 16:36:48 +0000 |
commit | 098d8e0950d6efbfb628b612f45df45b3c2d7b05 (patch) | |
tree | a93b3d2b447f9069ec78b0ebbc874fe35db597e3 /libavformat/aviobuf.c | |
parent | b5ca9cd36fbfbbac95396c12e8e2d1e01cd7039f (diff) | |
download | ffmpeg-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.c | 4 |
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; |