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
7c029672
Commit
7c029672
authored
Sep 01, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avconv: move forced_key_frames to the options context.
parent
77d9c454
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
avconv.c
avconv.c
+5
-4
No files found.
avconv.c
View file @
7c029672
...
...
@@ -149,7 +149,6 @@ static int nb_frames_dup = 0;
static
int
nb_frames_drop
=
0
;
static
int
input_sync
;
static
int
force_fps
=
0
;
static
char
*
forced_key_frames
=
NULL
;
static
float
dts_delta_threshold
=
10
;
...
...
@@ -319,6 +318,8 @@ typedef struct OptionsContext {
int
nb_sample_fmts
;
SpecifierOpt
*
qscale
;
int
nb_qscale
;
SpecifierOpt
*
forced_key_frames
;
int
nb_forced_key_frames
;
}
OptionsContext
;
#define MATCH_PER_STREAM_OPT(name, type, outvar, fmtctx, st)\
...
...
@@ -3078,6 +3079,7 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc)
st
->
sample_aspect_ratio
=
av_d2q
(
frame_aspect_ratio
*
frame_height
/
frame_width
,
255
);
}
else
{
const
char
*
p
;
char
*
forced_key_frames
=
NULL
;
int
i
;
if
(
frame_rate
.
num
)
...
...
@@ -3135,12 +3137,12 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc)
}
}
MATCH_PER_STREAM_OPT
(
forced_key_frames
,
str
,
forced_key_frames
,
oc
,
st
);
if
(
forced_key_frames
)
parse_forced_key_frames
(
forced_key_frames
,
ost
,
video_enc
);
}
/* reset some key parameters */
av_freep
(
&
forced_key_frames
);
frame_pix_fmt
=
PIX_FMT_NONE
;
return
ost
;
}
...
...
@@ -3604,7 +3606,6 @@ static void opt_output_file(void *optctx, const char *filename)
av_freep
(
&
streamid_map
);
nb_streamid_map
=
0
;
av_freep
(
&
forced_key_frames
);
reset_options
(
o
);
}
...
...
@@ -4030,7 +4031,7 @@ static const OptionDef options[] = {
{
"qphist"
,
OPT_BOOL
|
OPT_EXPERT
|
OPT_VIDEO
,
{
(
void
*
)
&
qp_hist
},
"show QP histogram"
},
{
"force_fps"
,
OPT_BOOL
|
OPT_EXPERT
|
OPT_VIDEO
,
{(
void
*
)
&
force_fps
},
"force the selected framerate, disable the best supported framerate selection"
},
{
"streamid"
,
HAS_ARG
|
OPT_EXPERT
,
{(
void
*
)
opt_streamid
},
"set the value of an outfile streamid"
,
"streamIndex:value"
},
{
"force_key_frames"
,
OPT_STRING
|
HAS_ARG
|
OPT_EXPERT
|
OPT_VIDEO
,
{(
void
*
)
&
forced_key_frames
},
"force key frames at specified timestamps"
,
"timestamps"
},
{
"force_key_frames"
,
OPT_STRING
|
HAS_ARG
|
OPT_EXPERT
|
OPT_VIDEO
|
OPT_SPEC
,
{.
off
=
OFFSET
(
forced_key_frames
)
},
"force key frames at specified timestamps"
,
"timestamps"
},
/* audio options */
{
"aframes"
,
HAS_ARG
|
OPT_AUDIO
|
OPT_FUNC2
,
{(
void
*
)
opt_audio_frames
},
"set the number of audio frames to record"
,
"number"
},
...
...
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