[FFmpeg-cvslog] avcodec/mjpegdec: fix green line at the bottom with upscale v

Michael Niedermayer git at videolan.org
Sun Aug 31 15:43:23 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Aug 31 15:33:30 2014 +0200| [f0d4f00f24d41441ebd63694df57ab203a764aa5] | committer: Michael Niedermayer

avcodec/mjpegdec: fix green line at the bottom with upscale v

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f0d4f00f24d41441ebd63694df57ab203a764aa5
---

 libavcodec/mjpegdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index ac898bb..c3a3b86 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -2131,7 +2131,7 @@ the_end:
             for (i = s->height - 1; i; i--) {
                 uint8_t *src1 = &((uint8_t *)s->picture_ptr->data[p])[i / 2 * s->linesize[p]];
                 uint8_t *src2 = &((uint8_t *)s->picture_ptr->data[p])[(i + 1) / 2 * s->linesize[p]];
-                if (src1 == src2) {
+                if (src1 == src2 || i == s->height - 1) {
                     memcpy(dst, src1, w);
                 } else {
                     for (index = 0; index < w; index++)



More information about the ffmpeg-cvslog mailing list