Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
58e4b459
Commit
58e4b459
authored
Apr 27, 2014
by
Tristan Matthews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
png: encoder: fix row offset calculation
parent
88857130
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
modules/codec/png.c
modules/codec/png.c
+4
-7
No files found.
modules/codec/png.c
View file @
58e4b459
...
...
@@ -393,12 +393,9 @@ static block_t *EncodeBlock(encoder_t *p_enc, picture_t *p_pic)
png_infop
p_end_info
=
png_create_info_struct
(
p_png
);
if
(
p_end_info
==
NULL
)
goto
error
;
const
unsigned
i_width
=
p_enc
->
fmt_in
.
video
.
i_visible_width
;
const
unsigned
i_height
=
p_enc
->
fmt_in
.
video
.
i_visible_height
;
png_set_IHDR
(
p_png
,
p_info
,
i
_width
,
i
_height
,
p_enc
->
fmt_in
.
video
.
i_visible
_width
,
p_enc
->
fmt_in
.
video
.
i_visible
_height
,
8
,
PNG_COLOR_TYPE_RGB
,
PNG_INTERLACE_NONE
,
PNG_COMPRESSION_TYPE_DEFAULT
,
PNG_FILTER_TYPE_DEFAULT
);
if
(
p_sys
->
b_error
)
goto
error
;
...
...
@@ -408,9 +405,9 @@ static block_t *EncodeBlock(encoder_t *p_enc, picture_t *p_pic)
/* Encode picture */
for
(
unsigned
i
=
0
;
i
<
i_height
;
i
++
)
for
(
int
i
=
0
;
i
<
p_pic
->
p
->
i_lines
;
i
++
)
{
png_write_row
(
p_png
,
p_pic
->
p
->
p_pixels
+
(
i
_width
*
i
*
3
)
);
png_write_row
(
p_png
,
p_pic
->
p
->
p_pixels
+
(
i
*
p_pic
->
p
->
i_pitch
)
);
if
(
p_sys
->
b_error
)
goto
error
;
}
...
...
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