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
9580818c
Commit
9580818c
authored
Apr 04, 2014
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avconv: rename OutputStream.opts to OutputStream.encoder_opts
This makes it more clear what is this variable for exactly.
parent
01947f07
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
avconv.c
avconv.c
+7
-7
avconv.h
avconv.h
+1
-1
avconv_opt.c
avconv_opt.c
+4
-4
No files found.
avconv.c
View file @
9580818c
...
...
@@ -1878,7 +1878,7 @@ static int transcode_init(void)
DEFAULT_PASS_LOGFILENAME_PREFIX
,
i
);
if
(
!
strcmp
(
ost
->
enc
->
name
,
"libx264"
))
{
av_dict_set
(
&
ost
->
opts
,
"stats"
,
logfilename
,
AV_DICT_DONT_OVERWRITE
);
av_dict_set
(
&
ost
->
encoder_
opts
,
"stats"
,
logfilename
,
AV_DICT_DONT_OVERWRITE
);
}
else
{
if
(
enc_ctx
->
flags
&
CODEC_FLAG_PASS1
)
{
f
=
fopen
(
logfilename
,
"wb"
);
...
...
@@ -1921,21 +1921,21 @@ static int transcode_init(void)
memcpy
(
ost
->
st
->
codec
->
subtitle_header
,
dec
->
subtitle_header
,
dec
->
subtitle_header_size
);
ost
->
st
->
codec
->
subtitle_header_size
=
dec
->
subtitle_header_size
;
}
if
(
!
av_dict_get
(
ost
->
opts
,
"threads"
,
NULL
,
0
))
av_dict_set
(
&
ost
->
opts
,
"threads"
,
"auto"
,
0
);
if
((
ret
=
avcodec_open2
(
ost
->
st
->
codec
,
codec
,
&
ost
->
opts
))
<
0
)
{
if
(
!
av_dict_get
(
ost
->
encoder_
opts
,
"threads"
,
NULL
,
0
))
av_dict_set
(
&
ost
->
encoder_
opts
,
"threads"
,
"auto"
,
0
);
if
((
ret
=
avcodec_open2
(
ost
->
st
->
codec
,
codec
,
&
ost
->
encoder_
opts
))
<
0
)
{
if
(
ret
==
AVERROR_EXPERIMENTAL
)
abort_codec_experimental
(
codec
,
1
);
snprintf
(
error
,
sizeof
(
error
),
"Error while opening encoder for output stream #%d:%d - maybe incorrect parameters such as bit_rate, rate, width or height"
,
ost
->
file_index
,
ost
->
index
);
goto
dump_format
;
}
assert_avoptions
(
ost
->
opts
);
assert_avoptions
(
ost
->
encoder_
opts
);
if
(
ost
->
st
->
codec
->
bit_rate
&&
ost
->
st
->
codec
->
bit_rate
<
1000
)
av_log
(
NULL
,
AV_LOG_WARNING
,
"The bitrate parameter is set too low."
"It takes bits/s as argument, not kbits/s
\n
"
);
}
else
{
av_opt_set_dict
(
ost
->
st
->
codec
,
&
ost
->
opts
);
av_opt_set_dict
(
ost
->
st
->
codec
,
&
ost
->
encoder_
opts
);
}
}
...
...
@@ -2506,7 +2506,7 @@ static int transcode(void)
}
av_freep
(
&
ost
->
st
->
codec
->
subtitle_header
);
av_free
(
ost
->
forced_kf_pts
);
av_dict_free
(
&
ost
->
opts
);
av_dict_free
(
&
ost
->
encoder_
opts
);
av_dict_free
(
&
ost
->
resample_opts
);
}
}
...
...
avconv.h
View file @
9580818c
...
...
@@ -336,7 +336,7 @@ typedef struct OutputStream {
char
*
avfilter
;
int64_t
sws_flags
;
AVDictionary
*
opts
;
AVDictionary
*
encoder_
opts
;
AVDictionary
*
resample_opts
;
int
finished
;
/* no more packets should be written for this stream */
int
stream_copy
;
...
...
avconv_opt.c
View file @
9580818c
...
...
@@ -894,7 +894,7 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
AVIOContext
*
s
=
NULL
;
char
*
buf
=
NULL
,
*
arg
=
NULL
,
*
preset
=
NULL
;
ost
->
opts
=
filter_codec_opts
(
o
->
g
->
codec_opts
,
ost
->
enc
->
id
,
oc
,
st
,
ost
->
enc
);
ost
->
encoder_
opts
=
filter_codec_opts
(
o
->
g
->
codec_opts
,
ost
->
enc
->
id
,
oc
,
st
,
ost
->
enc
);
MATCH_PER_STREAM_OPT
(
presets
,
str
,
preset
,
oc
,
st
);
if
(
preset
&&
(
!
(
ret
=
get_preset_file_2
(
preset
,
ost
->
enc
->
name
,
&
s
))))
{
...
...
@@ -909,7 +909,7 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
exit_program
(
1
);
}
*
arg
++
=
0
;
av_dict_set
(
&
ost
->
opts
,
buf
,
arg
,
AV_DICT_DONT_OVERWRITE
);
av_dict_set
(
&
ost
->
encoder_
opts
,
buf
,
arg
,
AV_DICT_DONT_OVERWRITE
);
av_free
(
buf
);
}
while
(
!
s
->
eof_reached
);
avio_close
(
s
);
...
...
@@ -921,7 +921,7 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
exit_program
(
1
);
}
}
else
{
ost
->
opts
=
filter_codec_opts
(
o
->
g
->
codec_opts
,
AV_CODEC_ID_NONE
,
oc
,
st
,
NULL
);
ost
->
encoder_
opts
=
filter_codec_opts
(
o
->
g
->
codec_opts
,
AV_CODEC_ID_NONE
,
oc
,
st
,
NULL
);
}
avcodec_get_context_defaults3
(
st
->
codec
,
ost
->
enc
);
...
...
@@ -1565,7 +1565,7 @@ loop_end:
unused_opts
=
strip_specifiers
(
o
->
g
->
codec_opts
);
for
(
i
=
of
->
ost_index
;
i
<
nb_output_streams
;
i
++
)
{
e
=
NULL
;
while
((
e
=
av_dict_get
(
output_streams
[
i
]
->
opts
,
""
,
e
,
while
((
e
=
av_dict_get
(
output_streams
[
i
]
->
encoder_
opts
,
""
,
e
,
AV_DICT_IGNORE_SUFFIX
)))
av_dict_set
(
&
unused_opts
,
e
->
key
,
NULL
,
0
);
}
...
...
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