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
3c3d68a9
Commit
3c3d68a9
authored
Jan 29, 2013
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix 1bpp palettized png with width not a multiple of 8.
Fixes ticket #2204.
parent
dc8dd2f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
pngdec.c
libavcodec/pngdec.c
+6
-2
No files found.
libavcodec/pngdec.c
View file @
3c3d68a9
...
...
@@ -765,10 +765,14 @@ static int decode_frame(AVCodecContext *avctx,
exit_loop
:
if
(
s
->
bits_per_pixel
==
1
&&
s
->
color_type
==
PNG_COLOR_TYPE_PALETTE
){
int
i
,
j
;
int
i
,
j
,
k
;
uint8_t
*
pd
=
s
->
current_picture
->
data
[
0
];
for
(
j
=
0
;
j
<
s
->
height
;
j
++
)
{
for
(
i
=
s
->
width
/
8
-
1
;
i
>=
0
;
i
--
)
{
i
=
s
->
width
/
8
;
for
(
k
=
7
;
k
>=
1
;
k
--
)
if
((
s
->
width
&
7
)
>=
k
)
pd
[
8
*
i
+
k
-
1
]
=
(
pd
[
i
]
>>
8
-
k
)
&
1
;
for
(
i
--
;
i
>=
0
;
i
--
)
{
pd
[
8
*
i
+
7
]
=
pd
[
i
]
&
1
;
pd
[
8
*
i
+
6
]
=
(
pd
[
i
]
>>
1
)
&
1
;
pd
[
8
*
i
+
5
]
=
(
pd
[
i
]
>>
2
)
&
1
;
...
...
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