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
09af7fb3
Commit
09af7fb3
authored
Aug 17, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avconv: make itsscale syntax consistent with other options.
Move the stream specifier to the option name.
parent
88867844
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
20 deletions
+17
-20
avconv.c
avconv.c
+17
-20
No files found.
avconv.c
View file @
09af7fb3
...
...
@@ -100,8 +100,7 @@ static const OptionDef options[];
#define MAX_FILES 100
static
const
char
*
last_asked_format
=
NULL
;
static
double
*
ts_scale
;
static
int
nb_ts_scale
;
static
AVDictionary
*
ts_scale
;
static
AVFormatContext
*
output_files
[
MAX_FILES
];
static
AVDictionary
*
output_opts
[
MAX_FILES
];
...
...
@@ -2777,18 +2776,7 @@ static int opt_map_metadata(const char *opt, const char *arg)
static
int
opt_input_ts_scale
(
const
char
*
opt
,
const
char
*
arg
)
{
unsigned
int
stream
;
double
scale
;
char
*
p
;
stream
=
strtol
(
arg
,
&
p
,
0
);
if
(
*
p
)
p
++
;
scale
=
strtod
(
p
,
&
p
);
ts_scale
=
grow_array
(
ts_scale
,
sizeof
(
*
ts_scale
),
&
nb_ts_scale
,
stream
+
1
);
ts_scale
[
stream
]
=
scale
;
return
0
;
return
av_dict_set
(
&
ts_scale
,
opt
,
arg
,
0
);
}
static
int
opt_recording_time
(
const
char
*
opt
,
const
char
*
arg
)
...
...
@@ -2867,12 +2855,14 @@ static AVCodec *choose_codec(AVFormatContext *s, AVStream *st, enum AVMediaType
*/
static
void
add_input_streams
(
AVFormatContext
*
ic
)
{
int
i
,
rfps
,
rfps_base
;
int
i
,
rfps
,
rfps_base
,
ret
;
for
(
i
=
0
;
i
<
ic
->
nb_streams
;
i
++
)
{
AVStream
*
st
=
ic
->
streams
[
i
];
AVCodecContext
*
dec
=
st
->
codec
;
AVDictionaryEntry
*
e
=
NULL
;
InputStream
*
ist
;
char
*
scale
=
NULL
;
dec
->
thread_count
=
thread_count
;
...
...
@@ -2883,8 +2873,16 @@ static void add_input_streams(AVFormatContext *ic)
ist
->
discard
=
1
;
ist
->
opts
=
filter_codec_opts
(
codec_opts
,
ist
->
st
->
codec
->
codec_id
,
ic
,
st
);
if
(
i
<
nb_ts_scale
)
ist
->
ts_scale
=
ts_scale
[
i
];
while
(
e
=
av_dict_get
(
ts_scale
,
""
,
e
,
AV_DICT_IGNORE_SUFFIX
))
{
char
*
p
=
strchr
(
e
->
key
,
':'
);
if
((
ret
=
check_stream_specifier
(
ic
,
st
,
p
?
p
+
1
:
""
))
>
0
)
scale
=
e
->
value
;
else
if
(
ret
<
0
)
exit_program
(
1
);
}
if
(
scale
)
ist
->
ts_scale
=
strtod
(
scale
,
NULL
);
ist
->
dec
=
choose_codec
(
ic
,
st
,
dec
->
codec_type
,
codec_names
);
...
...
@@ -3068,8 +3066,7 @@ static int opt_input_file(const char *opt, const char *filename)
audio_sample_rate
=
0
;
audio_channels
=
0
;
audio_sample_fmt
=
AV_SAMPLE_FMT_NONE
;
av_freep
(
&
ts_scale
);
nb_ts_scale
=
0
;
av_dict_free
(
&
ts_scale
);
for
(
i
=
0
;
i
<
orig_nb_streams
;
i
++
)
av_dict_free
(
&
opts
[
i
]);
...
...
@@ -4061,7 +4058,7 @@ static const OptionDef options[] = {
{
"fs"
,
HAS_ARG
|
OPT_INT64
,
{(
void
*
)
&
limit_filesize
},
"set the limit file size in bytes"
,
"limit_size"
},
//
{
"ss"
,
HAS_ARG
,
{(
void
*
)
opt_start_time
},
"set the start time offset"
,
"time_off"
},
{
"itsoffset"
,
HAS_ARG
,
{(
void
*
)
opt_input_ts_offset
},
"set the input ts offset"
,
"time_off"
},
{
"itsscale"
,
HAS_ARG
,
{(
void
*
)
opt_input_ts_scale
},
"set the input ts scale"
,
"s
tream:s
cale"
},
{
"itsscale"
,
HAS_ARG
,
{(
void
*
)
opt_input_ts_scale
},
"set the input ts scale"
,
"scale"
},
{
"metadata"
,
HAS_ARG
,
{(
void
*
)
opt_metadata
},
"add metadata"
,
"string=string"
},
{
"dframes"
,
OPT_INT
|
HAS_ARG
,
{(
void
*
)
&
max_frames
[
AVMEDIA_TYPE_DATA
]},
"set the number of data frames to record"
,
"number"
},
{
"benchmark"
,
OPT_BOOL
|
OPT_EXPERT
,
{(
void
*
)
&
do_benchmark
},
...
...
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