[FFmpeg-cvslog] avcodec/mjpegdec: use memset to clear alpha
Marton Balint
git at videolan.org
Fri Dec 29 00:55:46 EET 2023
ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sat Nov 25 19:55:46 2023 +0100| [e6b9bfaac3f36ba49c08b8da72c6514030cc4476] | committer: Marton Balint
avcodec/mjpegdec: use memset to clear alpha
Signed-off-by: Marton Balint <cus at passwd.hu>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e6b9bfaac3f36ba49c08b8da72c6514030cc4476
---
libavcodec/mjpegdec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index d78b5453a5..cfeca6a586 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -2793,8 +2793,8 @@ the_end:
dst[0][j] = g*257 >> 16;
dst[1][j] = b*257 >> 16;
dst[2][j] = r*257 >> 16;
- dst[3][j] = 255;
}
+ memset(dst[3], 255, w);
}
}
if (s->adobe_transform == 2 && s->avctx->pix_fmt == AV_PIX_FMT_YUVA444P) {
@@ -2816,8 +2816,8 @@ the_end:
dst[0][j] = r*257 >> 16;
dst[1][j] = (g*257 >> 16) + 128;
dst[2][j] = (b*257 >> 16) + 128;
- dst[3][j] = 255;
}
+ memset(dst[3], 255, w);
}
}
More information about the ffmpeg-cvslog
mailing list