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
c15f6098
Commit
c15f6098
authored
Feb 02, 2016
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avconv: pass the hw context from filters to the encoder
parent
871d0930
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
avconv.c
avconv.c
+6
-0
No files found.
avconv.c
View file @
c15f6098
...
@@ -1581,6 +1581,12 @@ static int init_output_stream(OutputStream *ost, char *error, int error_len)
...
@@ -1581,6 +1581,12 @@ static int init_output_stream(OutputStream *ost, char *error, int error_len)
if
(
!
av_dict_get
(
ost
->
encoder_opts
,
"threads"
,
NULL
,
0
))
if
(
!
av_dict_get
(
ost
->
encoder_opts
,
"threads"
,
NULL
,
0
))
av_dict_set
(
&
ost
->
encoder_opts
,
"threads"
,
"auto"
,
0
);
av_dict_set
(
&
ost
->
encoder_opts
,
"threads"
,
"auto"
,
0
);
if
(
ost
->
filter
&&
ost
->
filter
->
filter
->
inputs
[
0
]
->
hw_frames_ctx
)
{
ost
->
enc_ctx
->
hw_frames_ctx
=
av_buffer_ref
(
ost
->
filter
->
filter
->
inputs
[
0
]
->
hw_frames_ctx
);
if
(
!
ost
->
enc_ctx
->
hw_frames_ctx
)
return
AVERROR
(
ENOMEM
);
}
if
((
ret
=
avcodec_open2
(
ost
->
enc_ctx
,
codec
,
&
ost
->
encoder_opts
))
<
0
)
{
if
((
ret
=
avcodec_open2
(
ost
->
enc_ctx
,
codec
,
&
ost
->
encoder_opts
))
<
0
)
{
if
(
ret
==
AVERROR_EXPERIMENTAL
)
if
(
ret
==
AVERROR_EXPERIMENTAL
)
abort_codec_experimental
(
codec
,
1
);
abort_codec_experimental
(
codec
,
1
);
...
...
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