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
c4f63b78
Commit
c4f63b78
authored
May 08, 2017
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/webp: Factor update_canvas_size() out
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
2f2bc2e2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
webp.c
libavcodec/webp.c
+17
-10
No files found.
libavcodec/webp.c
View file @
c4f63b78
...
...
@@ -1099,6 +1099,21 @@ static int apply_color_indexing_transform(WebPContext *s)
return
0
;
}
static
void
update_canvas_size
(
AVCodecContext
*
avctx
,
int
w
,
int
h
)
{
WebPContext
*
s
=
avctx
->
priv_data
;
if
(
s
->
width
&&
s
->
width
!=
w
)
{
av_log
(
avctx
,
AV_LOG_WARNING
,
"Width mismatch. %d != %d
\n
"
,
s
->
width
,
w
);
}
s
->
width
=
w
;
if
(
s
->
height
&&
s
->
height
!=
h
)
{
av_log
(
avctx
,
AV_LOG_WARNING
,
"Height mismatch. %d != %d
\n
"
,
s
->
height
,
h
);
}
s
->
height
=
h
;
}
static
int
vp8_lossless_decode_frame
(
AVCodecContext
*
avctx
,
AVFrame
*
p
,
int
*
got_frame
,
uint8_t
*
data_start
,
unsigned
int
data_size
,
int
is_alpha_chunk
)
...
...
@@ -1123,16 +1138,8 @@ static int vp8_lossless_decode_frame(AVCodecContext *avctx, AVFrame *p,
w
=
get_bits
(
&
s
->
gb
,
14
)
+
1
;
h
=
get_bits
(
&
s
->
gb
,
14
)
+
1
;
if
(
s
->
width
&&
s
->
width
!=
w
)
{
av_log
(
avctx
,
AV_LOG_WARNING
,
"Width mismatch. %d != %d
\n
"
,
s
->
width
,
w
);
}
s
->
width
=
w
;
if
(
s
->
height
&&
s
->
height
!=
h
)
{
av_log
(
avctx
,
AV_LOG_WARNING
,
"Height mismatch. %d != %d
\n
"
,
s
->
width
,
w
);
}
s
->
height
=
h
;
update_canvas_size
(
avctx
,
w
,
h
);
ret
=
ff_set_dimensions
(
avctx
,
s
->
width
,
s
->
height
);
if
(
ret
<
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