diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2011-03-29 22:18:45 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-06-10 00:53:17 +0400 |
commit | c673c90515ab553c9ed9f4e1997600d1b3e4e2bb (patch) | |
tree | ed139a885e338588b9b98f3b179e7602a5954a97 /libavdevice/sndio_enc.c | |
parent | 6b105e3ee607b4d83f894ee0c18bbd1d6f1e996f (diff) |
oss,sndio: simplify by using FFMIN.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavdevice/sndio_enc.c')
-rw-r--r-- | libavdevice/sndio_enc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavdevice/sndio_enc.c b/libavdevice/sndio_enc.c index 6745ba4893..49a52b355e 100644 --- a/libavdevice/sndio_enc.c +++ b/libavdevice/sndio_enc.c @@ -49,9 +49,7 @@ static int audio_write_packet(AVFormatContext *s1, AVPacket *pkt) int len, ret; while (size > 0) { - len = s->buffer_size - s->buffer_offset; - if (len > size) - len = size; + len = FFMIN(s->buffer_size - s->buffer_offset, size); memcpy(s->buffer + s->buffer_offset, buf, len); buf += len; size -= len; |