Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
b20dee81
Commit
b20dee81
authored
Oct 16, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vsrc_testsrc: rgbtestsrc: fix undefined behaviour
Fixes #8238
parent
64a80588
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
vsrc_testsrc.c
libavfilter/vsrc_testsrc.c
+3
-3
No files found.
libavfilter/vsrc_testsrc.c
View file @
b20dee81
...
...
@@ -968,10 +968,10 @@ AVFILTER_DEFINE_CLASS(rgbtestsrc);
#define A 3
static
void
rgbtest_put_pixel
(
uint8_t
*
dst
,
int
dst_linesize
,
int
x
,
int
y
,
int
r
,
int
g
,
int
b
,
enum
AVPixelFormat
fmt
,
int
x
,
int
y
,
unsigned
r
,
unsigned
g
,
unsigned
b
,
enum
AVPixelFormat
fmt
,
uint8_t
rgba_map
[
4
])
{
int32_t
v
;
u
int32_t
v
;
uint8_t
*
p
;
switch
(
fmt
)
{
...
...
@@ -991,7 +991,7 @@ static void rgbtest_put_pixel(uint8_t *dst, int dst_linesize,
case
AV_PIX_FMT_BGRA
:
case
AV_PIX_FMT_ARGB
:
case
AV_PIX_FMT_ABGR
:
v
=
(
r
<<
(
rgba_map
[
R
]
*
8
))
+
(
g
<<
(
rgba_map
[
G
]
*
8
))
+
(
b
<<
(
rgba_map
[
B
]
*
8
))
+
(
255
<<
(
rgba_map
[
A
]
*
8
));
v
=
(
r
<<
(
rgba_map
[
R
]
*
8
))
+
(
g
<<
(
rgba_map
[
G
]
*
8
))
+
(
b
<<
(
rgba_map
[
B
]
*
8
))
+
(
255
U
<<
(
rgba_map
[
A
]
*
8
));
p
=
dst
+
4
*
x
+
y
*
dst_linesize
;
AV_WL32
(
p
,
v
);
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment