History

avcodec/mjpegdec: use memset to clear alpha

Marton Balint committed 2 years ago

Commit e6b9bfa1 parent f7f4ff11 file · +2 −2Browse files

Unified · Split

libavcodec/mjpegdec.c+2−2
@@ -2793,8 +2793,8 @@ the_end: · 2792 unmodified lines
27932793 dst[0][j] = g*257 >> 16;
27942794 dst[1][j] = b*257 >> 16;
27952795 dst[2][j] = r*257 >> 16;
2796− dst[3][j] = 255;
27972796 }
2797+ memset(dst[3], 255, w);
27982798 }
27992799 }
28002800 if (s->adobe_transform == 2 && s->avctx->pix_fmt == AV_PIX_FMT_YUVA444P) {
@@ -2816,8 +2816,8 @@ the_end: · 15 unmodified lines
28162816 dst[0][j] = r*257 >> 16;
28172817 dst[1][j] = (g*257 >> 16) + 128;
28182818 dst[2][j] = (b*257 >> 16) + 128;
2819− dst[3][j] = 255;
28202819 }
2820+ memset(dst[3], 255, w);
28212821 }
28222822 }
28232823

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t