diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-07-07 10:59:19 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-07 11:17:53 +0200 |
commit | 2adf8a9c09c9d00c4b34c062206cefad489f9ba9 (patch) | |
tree | 23b1bb738e3aa865446d6158ffd30a85c74b338c | |
parent | 1aeddc3cbfe7fd668a3580af6517cb605a006874 (diff) | |
parent | 4e7f0b082d8c4b360312216b9241bec65ff63b35 (diff) | |
download | ffmpeg-2adf8a9c09c9d00c4b34c062206cefad489f9ba9.tar.gz |
Merge commit '4e7f0b082d8c4b360312216b9241bec65ff63b35'
* commit '4e7f0b082d8c4b360312216b9241bec65ff63b35':
kmvc: Clip pixel position to valid range
The added clip should make no difference, there are already checks for
the index.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/kmvc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/kmvc.c b/libavcodec/kmvc.c index 678554c5aa..f5adfd60d2 100644 --- a/libavcodec/kmvc.c +++ b/libavcodec/kmvc.c @@ -30,6 +30,7 @@ #include "avcodec.h" #include "bytestream.h" #include "internal.h" +#include "libavutil/common.h" #define KMVC_KEYFRAME 0x80 #define KMVC_PALETTE 0x40 @@ -55,7 +56,7 @@ typedef struct BitBuf { int bitbuf; } BitBuf; -#define BLK(data, x, y) data[(x) + (y) * 320] +#define BLK(data, x, y) data[av_clip((x) + (y) * 320, 0, 320 * 200 -1)] #define kmvc_init_getbits(bb, g) bb.bits = 7; bb.bitbuf = bytestream2_get_byte(g); |