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
2e254bb8
Commit
2e254bb8
authored
Apr 24, 2019
by
Timo Rothenpieler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/nvenc: fix indentation
parent
23ed147e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
nvenc.c
libavcodec/nvenc.c
+12
-12
No files found.
libavcodec/nvenc.c
View file @
2e254bb8
...
...
@@ -1564,21 +1564,21 @@ static int nvenc_find_free_reg_resource(AVCodecContext *avctx)
if
(
ctx
->
nb_registered_frames
==
FF_ARRAY_ELEMS
(
ctx
->
registered_frames
))
{
for
(
first_round
=
1
;
first_round
>=
0
;
first_round
--
)
{
for
(
i
=
0
;
i
<
ctx
->
nb_registered_frames
;
i
++
)
{
if
(
!
ctx
->
registered_frames
[
i
].
mapped
)
{
if
(
ctx
->
registered_frames
[
i
].
regptr
)
{
if
(
first_round
)
continue
;
nv_status
=
p_nvenc
->
nvEncUnregisterResource
(
ctx
->
nvencoder
,
ctx
->
registered_frames
[
i
].
regptr
);
if
(
nv_status
!=
NV_ENC_SUCCESS
)
return
nvenc_print_error
(
avctx
,
nv_status
,
"Failed unregistering unused input resource"
);
ctx
->
registered_frames
[
i
].
ptr
=
NULL
;
ctx
->
registered_frames
[
i
].
regptr
=
NULL
;
for
(
i
=
0
;
i
<
ctx
->
nb_registered_frames
;
i
++
)
{
if
(
!
ctx
->
registered_frames
[
i
].
mapped
)
{
if
(
ctx
->
registered_frames
[
i
].
regptr
)
{
if
(
first_round
)
continue
;
nv_status
=
p_nvenc
->
nvEncUnregisterResource
(
ctx
->
nvencoder
,
ctx
->
registered_frames
[
i
].
regptr
);
if
(
nv_status
!=
NV_ENC_SUCCESS
)
return
nvenc_print_error
(
avctx
,
nv_status
,
"Failed unregistering unused input resource"
);
ctx
->
registered_frames
[
i
].
ptr
=
NULL
;
ctx
->
registered_frames
[
i
].
regptr
=
NULL
;
}
return
i
;
}
return
i
;
}
}
}
}
else
{
return
ctx
->
nb_registered_frames
++
;
}
...
...
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