summaryrefslogtreecommitdiff
path: root/libavcodec/lcldec.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-05-31 10:44:42 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-05-31 10:44:42 +0000
commite4f141ad60afbd721e494975677fbfd8e0ebcb22 (patch)
treea8e6d7c4b07b703752f54a9e3e53c6bb8cbe36fd /libavcodec/lcldec.c
parent0d48e6ec7f589c51ef883f8af66e15c5f1e4ff25 (diff)
downloadffmpeg-e4f141ad60afbd721e494975677fbfd8e0ebcb22.tar.gz
One more use for FFMIN.
Originally committed as revision 19055 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/lcldec.c')
-rw-r--r--libavcodec/lcldec.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
index 927f77b30b..5225ff0552 100644
--- a/libavcodec/lcldec.c
+++ b/libavcodec/lcldec.c
@@ -102,9 +102,7 @@ static unsigned int mszh_decomp(const unsigned char * srcptr, int srclen, unsign
cnt = (ofs >> 11) + 1;
ofs &= 0x7ff;
cnt *= 4;
- if (destptr_end - destptr < cnt) {
- cnt = destptr_end - destptr;
- }
+ cnt = FFMIN(cnt, destptr_end - destptr);
av_memcpy_backptr(destptr, ofs, cnt);
destptr += cnt;
}