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
dfea6d2e
Commit
dfea6d2e
authored
Dec 25, 2019
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/libx264: use AV_OPT_TYPE_DICT for x264-params
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
9ac1066d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
14 deletions
+9
-14
libx264.c
libavcodec/libx264.c
+9
-14
No files found.
libavcodec/libx264.c
View file @
dfea6d2e
...
...
@@ -95,7 +95,7 @@ typedef struct X264Context {
int
scenechange_threshold
;
int
noise_reduction
;
char
*
x264_params
;
AVDictionary
*
x264_params
;
int
nb_reordered_opaque
,
next_reordered_opaque
;
int64_t
*
reordered_opaque
;
...
...
@@ -892,20 +892,15 @@ FF_ENABLE_DEPRECATION_WARNINGS
}
}
if
(
x4
->
x264_params
)
{
AVDictionary
*
dict
=
NULL
;
AVDictionaryEntry
*
en
=
NULL
;
if
(
!
av_dict_parse_string
(
&
dict
,
x4
->
x264_params
,
"="
,
":"
,
0
))
{
while
((
en
=
av_dict_get
(
dict
,
""
,
en
,
AV_DICT_IGNORE_SUFFIX
)))
{
{
AVDictionaryEntry
*
en
=
NULL
;
while
(
en
=
av_dict_get
(
x4
->
x264_params
,
""
,
en
,
AV_DICT_IGNORE_SUFFIX
))
{
if
(
x264_param_parse
(
&
x4
->
params
,
en
->
key
,
en
->
value
)
<
0
)
av_log
(
avctx
,
AV_LOG_WARNING
,
"Error parsing option '%s = %s'.
\n
"
,
en
->
key
,
en
->
value
);
}
av_dict_free
(
&
dict
);
}
}
// update AVCodecContext with x264 parameters
...
...
@@ -1116,7 +1111,7 @@ static const AVOption options[] = {
{
"sc_threshold"
,
"Scene change threshold"
,
OFFSET
(
scenechange_threshold
),
AV_OPT_TYPE_INT
,
{
.
i64
=
-
1
},
INT_MIN
,
INT_MAX
,
VE
},
{
"noise_reduction"
,
"Noise reduction"
,
OFFSET
(
noise_reduction
),
AV_OPT_TYPE_INT
,
{
.
i64
=
-
1
},
INT_MIN
,
INT_MAX
,
VE
},
{
"x264-params"
,
"Override the x264 configuration using a :-separated list of key=value parameters"
,
OFFSET
(
x264_params
),
AV_OPT_TYPE_
STRING
,
{
0
},
0
,
0
,
VE
},
{
"x264-params"
,
"Override the x264 configuration using a :-separated list of key=value parameters"
,
OFFSET
(
x264_params
),
AV_OPT_TYPE_
DICT
,
{
0
},
0
,
0
,
VE
},
{
NULL
},
};
...
...
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