Commit 7a0e8d3
committed
fix: use BlendMode.Src for video frame rendering
Video frames from Windows Media Foundation have alpha bytes set to 0x00.
With the default SrcOver blend mode, this causes the video to appear
washed out or nearly invisible on light backgrounds, as pixels blend
with the underlying surface color.
Using BlendMode.Src ensures video pixels fully replace the destination,
regardless of the alpha channel value.
Fixes #981 parent f2fe9c6 commit 7a0e8d3
1 file changed
Lines changed: 4 additions & 1 deletion
File tree
- mediaplayer/src/commonMain/kotlin/io/github/kdroidfilter/composemediaplayer/util
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
101 | | - | |
| 102 | + | |
| 103 | + | |
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
| |||
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
| 114 | + | |
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
0 commit comments