summaryrefslogtreecommitdiff
path: root/libavformat/aviobuf.c
diff options
context:
space:
mode:
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 dd6f9b6c95..268326d9a8 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -104,10 +104,8 @@ void put_byte(ByteIOContext *s, int b)
void put_buffer(ByteIOContext *s, const unsigned char *buf, int size)
{
- int len;
-
while (size > 0) {
- len = FFMIN(s->buf_end - s->buf_ptr, size);
+ int len = FFMIN(s->buf_end - s->buf_ptr, size);
memcpy(s->buf_ptr, buf, len);
s->buf_ptr += len;