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
fdbb4b9a
Commit
fdbb4b9a
authored
May 03, 2018
by
Timo Rothenpieler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/nvenc: move reconfig_encoder call inside of push/pop ctx
Also make it void, it must not fail the encode anyway.
parent
5a88e8c3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
nvenc.c
libavcodec/nvenc.c
+3
-5
No files found.
libavcodec/nvenc.c
View file @
fdbb4b9a
...
...
@@ -1948,7 +1948,7 @@ static int output_ready(AVCodecContext *avctx, int flush)
return
(
nb_ready
>
0
)
&&
(
nb_ready
+
nb_pending
>=
ctx
->
async_depth
);
}
static
int
reconfig_encoder
(
AVCodecContext
*
avctx
,
const
AVFrame
*
frame
)
static
void
reconfig_encoder
(
AVCodecContext
*
avctx
,
const
AVFrame
*
frame
)
{
NvencContext
*
ctx
=
avctx
->
priv_data
;
NV_ENCODE_API_FUNCTION_LIST
*
p_nvenc
=
&
ctx
->
nvenc_dload_funcs
.
nvenc_funcs
;
...
...
@@ -2038,8 +2038,6 @@ static int reconfig_encoder(AVCodecContext *avctx, const AVFrame *frame)
}
}
return
0
;
}
int
ff_nvenc_send_frame
(
AVCodecContext
*
avctx
,
const
AVFrame
*
frame
)
...
...
@@ -2064,8 +2062,6 @@ int ff_nvenc_send_frame(AVCodecContext *avctx, const AVFrame *frame)
return
AVERROR_EOF
;
if
(
frame
)
{
reconfig_encoder
(
avctx
,
frame
);
in_surf
=
get_free_frame
(
ctx
);
if
(
!
in_surf
)
return
AVERROR
(
EAGAIN
);
...
...
@@ -2074,6 +2070,8 @@ int ff_nvenc_send_frame(AVCodecContext *avctx, const AVFrame *frame)
if
(
res
<
0
)
return
res
;
reconfig_encoder
(
avctx
,
frame
);
res
=
nvenc_upload_frame
(
avctx
,
frame
,
in_surf
);
res2
=
nvenc_pop_context
(
avctx
);
...
...
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