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
6cedd20b
Commit
6cedd20b
authored
Dec 24, 2016
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/pixlet: make sure scaling factors are not zero
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
ab31b46b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
pixlet.c
libavcodec/pixlet.c
+8
-2
No files found.
libavcodec/pixlet.c
View file @
6cedd20b
...
...
@@ -504,8 +504,14 @@ static int decode_plane(AVCodecContext *avctx, int plane, AVPacket *avpkt, AVFra
int
i
,
ret
;
for
(
i
=
ctx
->
levels
-
1
;
i
>=
0
;
i
--
)
{
ctx
->
scaling
[
plane
][
H
][
i
]
=
1000000
.
0
f
/
sign_extend
(
bytestream2_get_be32
(
&
ctx
->
gb
),
32
);
ctx
->
scaling
[
plane
][
V
][
i
]
=
1000000
.
0
f
/
sign_extend
(
bytestream2_get_be32
(
&
ctx
->
gb
),
32
);
int32_t
h
=
sign_extend
(
bytestream2_get_be32
(
&
ctx
->
gb
),
32
);
int32_t
v
=
sign_extend
(
bytestream2_get_be32
(
&
ctx
->
gb
),
32
);
if
(
!
h
||
!
v
)
return
AVERROR_INVALIDDATA
;
ctx
->
scaling
[
plane
][
H
][
i
]
=
1000000
.
0
f
/
h
;
ctx
->
scaling
[
plane
][
V
][
i
]
=
1000000
.
0
f
/
v
;
}
bytestream2_skip
(
&
ctx
->
gb
,
4
);
...
...
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