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
c5bb372e
Commit
c5bb372e
authored
Aug 29, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avconv: move chapter maps to options context.
parent
847529f8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
avconv.c
avconv.c
+11
-11
No files found.
avconv.c
View file @
c5bb372e
...
...
@@ -99,8 +99,6 @@ static const OptionDef options[];
static
AVDictionary
*
ts_scale
;
static
int
chapters_input_file
=
INT_MAX
;
/* indexed by output file stream index */
static
int
*
streamid_map
=
NULL
;
static
int
nb_streamid_map
=
0
;
...
...
@@ -321,6 +319,8 @@ typedef struct OptionsContext {
int
metadata_streams_manual
;
int
metadata_chapters_manual
;
int
chapters_input_file
;
int64_t
recording_time
;
uint64_t
limit_filesize
;
}
OptionsContext
;
...
...
@@ -367,6 +367,7 @@ static void reset_options(OptionsContext *o)
o
->
recording_time
=
INT64_MAX
;
o
->
limit_filesize
=
UINT64_MAX
;
o
->
chapters_input_file
=
INT_MAX
;
uninit_opts
();
init_opts
();
...
...
@@ -3586,23 +3587,23 @@ static void opt_output_file(void *optctx, const char *filename)
oc
->
flags
|=
AVFMT_FLAG_NONBLOCK
;
/* copy chapters */
if
(
chapters_input_file
>=
nb_input_files
)
{
if
(
chapters_input_file
==
INT_MAX
)
{
if
(
o
->
chapters_input_file
>=
nb_input_files
)
{
if
(
o
->
chapters_input_file
==
INT_MAX
)
{
/* copy chapters from the first input file that has them*/
chapters_input_file
=
-
1
;
o
->
chapters_input_file
=
-
1
;
for
(
i
=
0
;
i
<
nb_input_files
;
i
++
)
if
(
input_files
[
i
].
ctx
->
nb_chapters
)
{
chapters_input_file
=
i
;
o
->
chapters_input_file
=
i
;
break
;
}
}
else
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"Invalid input file index %d in chapter mapping.
\n
"
,
chapters_input_file
);
o
->
chapters_input_file
);
exit_program
(
1
);
}
}
if
(
chapters_input_file
>=
0
)
copy_chapters
(
&
input_files
[
chapters_input_file
],
&
output_files
[
nb_output_files
-
1
],
if
(
o
->
chapters_input_file
>=
0
)
copy_chapters
(
&
input_files
[
o
->
chapters_input_file
],
&
output_files
[
nb_output_files
-
1
],
o
->
metadata_chapters_manual
);
/* copy metadata */
...
...
@@ -3667,7 +3668,6 @@ static void opt_output_file(void *optctx, const char *filename)
audio_sample_rate
=
0
;
audio_channels
=
0
;
audio_sample_fmt
=
AV_SAMPLE_FMT_NONE
;
chapters_input_file
=
INT_MAX
;
av_freep
(
&
streamid_map
);
nb_streamid_map
=
0
;
...
...
@@ -4021,7 +4021,7 @@ static const OptionDef options[] = {
{
"map"
,
HAS_ARG
|
OPT_EXPERT
|
OPT_FUNC2
,
{(
void
*
)
opt_map
},
"set input stream mapping"
,
"file.stream[:syncfile.syncstream]"
},
{
"map_metadata"
,
HAS_ARG
|
OPT_EXPERT
|
OPT_FUNC2
,
{(
void
*
)
opt_map_metadata
},
"set metadata information of outfile from infile"
,
"outfile[,metadata]:infile[,metadata]"
},
{
"map_chapters"
,
OPT_INT
|
HAS_ARG
|
OPT_EXPERT
,
{(
void
*
)
&
chapters_input_file
},
"set chapters mapping"
,
"input_file_index"
},
{
"map_chapters"
,
OPT_INT
|
HAS_ARG
|
OPT_EXPERT
|
OPT_OFFSET
,
{.
off
=
OFFSET
(
chapters_input_file
)
},
"set chapters mapping"
,
"input_file_index"
},
{
"t"
,
HAS_ARG
|
OPT_TIME
|
OPT_OFFSET
,
{.
off
=
OFFSET
(
recording_time
)},
"record or transcode
\"
duration
\"
seconds of audio/video"
,
"duration"
},
{
"fs"
,
HAS_ARG
|
OPT_INT64
|
OPT_OFFSET
,
{.
off
=
OFFSET
(
limit_filesize
)},
"set the limit file size in bytes"
,
"limit_size"
},
//
{
"ss"
,
HAS_ARG
|
OPT_TIME
|
OPT_OFFSET
,
{.
off
=
OFFSET
(
start_time
)},
"set the start time offset"
,
"time_off"
},
...
...
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