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
39bb27bf
Commit
39bb27bf
authored
Jul 02, 2012
by
Janne Grunau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imgconvert: avoid undefined left shift in avcodec_find_best_pix_fmt
CC: libav-stable@libav.org
parent
47aed439
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
imgconvert.c
libavcodec/imgconvert.c
+2
-1
No files found.
libavcodec/imgconvert.c
View file @
39bb27bf
...
...
@@ -599,7 +599,8 @@ static enum PixelFormat avcodec_find_best_pix_fmt1(int64_t pix_fmt_mask,
/* find exact color match with smallest size */
dst_pix_fmt
=
PIX_FMT_NONE
;
min_dist
=
0x7fffffff
;
for
(
i
=
0
;
i
<
PIX_FMT_NB
;
i
++
)
{
/* test only the first 64 pixel formats to avoid undefined behaviour */
for
(
i
=
0
;
i
<
64
;
i
++
)
{
if
(
pix_fmt_mask
&
(
1ULL
<<
i
))
{
loss
=
avcodec_get_pix_fmt_loss
(
i
,
src_pix_fmt
,
has_alpha
)
&
loss_mask
;
if
(
loss
==
0
)
{
...
...
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