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
0030613d
Commit
0030613d
authored
Jul 19, 2015
by
Donny Yang
Committed by
Paul B Mahol
Jul 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/apngdec: Fix typos in decoder causing incorrect results
Signed-off-by:
Donny Yang
<
work@kota.moe
>
parent
fdac5ff6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
pngdec.c
libavcodec/pngdec.c
+6
-5
No files found.
libavcodec/pngdec.c
View file @
0030613d
...
...
@@ -851,13 +851,13 @@ static int decode_fctl_chunk(AVCodecContext *avctx, PNGDecContext *s,
cur_w
>
s
->
width
-
x_offset
||
cur_h
>
s
->
height
-
y_offset
)
return
AVERROR_INVALIDDATA
;
if
(
sequence_number
==
0
&&
s
->
dispose_op
==
APNG_DISPOSE_OP_PREVIOUS
)
{
if
(
sequence_number
==
0
&&
dispose_op
==
APNG_DISPOSE_OP_PREVIOUS
)
{
// No previous frame to revert to for the first frame
// Spec says to just treat it as a APNG_DISPOSE_OP_BACKGROUND
s
->
dispose_op
=
APNG_DISPOSE_OP_BACKGROUND
;
dispose_op
=
APNG_DISPOSE_OP_BACKGROUND
;
}
if
(
s
->
dispose
_op
==
APNG_BLEND_OP_OVER
&&
!
s
->
has_trns
&&
(
if
(
blend
_op
==
APNG_BLEND_OP_OVER
&&
!
s
->
has_trns
&&
(
avctx
->
pix_fmt
==
AV_PIX_FMT_RGB24
||
avctx
->
pix_fmt
==
AV_PIX_FMT_RGB48BE
||
avctx
->
pix_fmt
==
AV_PIX_FMT_PAL8
||
...
...
@@ -865,8 +865,8 @@ static int decode_fctl_chunk(AVCodecContext *avctx, PNGDecContext *s,
avctx
->
pix_fmt
==
AV_PIX_FMT_GRAY16BE
||
avctx
->
pix_fmt
==
AV_PIX_FMT_MONOBLACK
))
{
// APNG_
DISPOSE_OP_OVER is the same as APNG_DISPOSE
_OP_SOURCE when there is no alpha channel
s
->
dispose
_op
=
APNG_BLEND_OP_SOURCE
;
// APNG_
BLEND_OP_OVER is the same as APNG_BLEND
_OP_SOURCE when there is no alpha channel
blend
_op
=
APNG_BLEND_OP_SOURCE
;
}
s
->
cur_w
=
cur_w
;
...
...
@@ -1283,6 +1283,7 @@ static int update_thread_context(AVCodecContext *dst, const AVCodecContext *src)
pdst
->
cur_h
=
psrc
->
cur_h
;
pdst
->
x_offset
=
psrc
->
x_offset
;
pdst
->
y_offset
=
psrc
->
y_offset
;
pdst
->
has_trns
=
psrc
->
has_trns
;
pdst
->
dispose_op
=
psrc
->
dispose_op
;
...
...
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