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
0f8ae9d7
Commit
0f8ae9d7
authored
Mar 25, 2017
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/vp9: split a few assignment out of ifs
parent
f4d95e09
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
vp9.c
libavcodec/vp9.c
+10
-5
No files found.
libavcodec/vp9.c
View file @
0f8ae9d7
...
...
@@ -50,10 +50,13 @@ static int vp9_frame_alloc(AVCodecContext *avctx, VP9Frame *f)
VP9Context
*
s
=
avctx
->
priv_data
;
int
ret
,
sz
;
if
((
ret
=
ff_thread_get_buffer
(
avctx
,
&
f
->
tf
,
AV_GET_BUFFER_FLAG_REF
))
<
0
)
ret
=
ff_thread_get_buffer
(
avctx
,
&
f
->
tf
,
AV_GET_BUFFER_FLAG_REF
);
if
(
ret
<
0
)
return
ret
;
sz
=
64
*
s
->
sb_cols
*
s
->
sb_rows
;
if
(
!
(
f
->
extradata
=
av_buffer_allocz
(
sz
*
(
1
+
sizeof
(
struct
VP9mvrefPair
)))))
{
f
->
extradata
=
av_buffer_allocz
(
sz
*
(
1
+
sizeof
(
struct
VP9mvrefPair
)));
if
(
!
f
->
extradata
)
{
goto
fail
;
}
...
...
@@ -82,11 +85,13 @@ static int vp9_frame_ref(AVCodecContext *avctx, VP9Frame *dst, VP9Frame *src)
{
int
res
;
if
((
res
=
ff_thread_ref_frame
(
&
dst
->
tf
,
&
src
->
tf
))
<
0
)
{
res
=
ff_thread_ref_frame
(
&
dst
->
tf
,
&
src
->
tf
);
if
(
res
<
0
)
return
res
;
}
else
if
(
!
(
dst
->
extradata
=
av_buffer_ref
(
src
->
extradata
)))
{
dst
->
extradata
=
av_buffer_ref
(
src
->
extradata
);
if
(
!
dst
->
extradata
)
goto
fail
;
}
dst
->
segmentation_map
=
src
->
segmentation_map
;
dst
->
mv
=
src
->
mv
;
...
...
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