aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vp8.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2010-12-30 14:33:21 +0000
committerRonald S. Bultje <rsbultje@gmail.com>2010-12-30 14:33:21 +0000
commit7148da489e4991c88eeff9cd6238ad6e273613b5 (patch)
tree27c13be58c2b2bdbee0404cd72d3544017ed2d11 /libavcodec/vp8.c
parentf6bf6e511d297f0b74085fc464d2743e704f6208 (diff)
downloadffmpeg-7148da489e4991c88eeff9cd6238ad6e273613b5.tar.gz
Fix valgrind invalid read on top MB rows with CODEC_FLAG_EMU_EDGE set.
Originally committed as revision 26168 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vp8.c')
-rw-r--r--libavcodec/vp8.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 50ecaf1889..80d30e8046 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -1104,7 +1104,8 @@ void intra_predict(VP8Context *s, uint8_t *dst[3], VP8Macroblock *mb,
// if we're on the right edge of the frame, said edge is extended
// from the top macroblock
- if (mb_x == s->mb_width-1) {
+ if (!(!mb_y && avctx->flags & CODEC_FLAG_EMU_EDGE) &&
+ mb_x == s->mb_width-1) {
tr = tr_right[-1]*0x01010101;
tr_right = (uint8_t *)&tr;
}