mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avconv: remove some redundant temporary variables.
This commit is contained in:
parent
f8c314c81f
commit
059fb8c884
19
avconv.c
19
avconv.c
@ -2794,7 +2794,6 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
|
||||
AVStream *st = ic->streams[i];
|
||||
AVCodecContext *dec = st->codec;
|
||||
InputStream *ist;
|
||||
double scale = 1.0;
|
||||
|
||||
input_streams = grow_array(input_streams, sizeof(*input_streams), &nb_input_streams, nb_input_streams + 1);
|
||||
ist = &input_streams[nb_input_streams - 1];
|
||||
@ -2803,8 +2802,8 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
|
||||
ist->discard = 1;
|
||||
ist->opts = filter_codec_opts(codec_opts, ist->st->codec->codec_id, ic, st);
|
||||
|
||||
MATCH_PER_STREAM_OPT(ts_scale, dbl, scale, ic, st);
|
||||
ist->ts_scale = scale;
|
||||
ist->ts_scale = 1.0;
|
||||
MATCH_PER_STREAM_OPT(ts_scale, dbl, ist->ts_scale, ic, st);
|
||||
|
||||
ist->dec = choose_decoder(o, ic, st);
|
||||
|
||||
@ -3112,7 +3111,6 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
|
||||
OutputStream *ost;
|
||||
AVStream *st = avformat_new_stream(oc, NULL);
|
||||
int idx = oc->nb_streams - 1, ret = 0;
|
||||
int64_t max_frames = INT64_MAX;
|
||||
char *bsf = NULL, *next, *codec_tag = NULL;
|
||||
AVBitStreamFilterContext *bsfc, *bsfc_prev = NULL;
|
||||
double qscale = -1;
|
||||
@ -3167,8 +3165,8 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
|
||||
exit_program(1);
|
||||
}
|
||||
|
||||
MATCH_PER_STREAM_OPT(max_frames, i64, max_frames, oc, st);
|
||||
ost->max_frames = max_frames;
|
||||
ost->max_frames = INT64_MAX;
|
||||
MATCH_PER_STREAM_OPT(max_frames, i64, ost->max_frames, oc, st);
|
||||
|
||||
MATCH_PER_STREAM_OPT(bitstream_filters, str, bsf, oc, st);
|
||||
while (bsf) {
|
||||
@ -3240,7 +3238,7 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc)
|
||||
char *forced_key_frames = NULL, *frame_rate = NULL, *frame_size = NULL;
|
||||
char *frame_aspect_ratio = NULL, *frame_pix_fmt = NULL;
|
||||
char *intra_matrix = NULL, *inter_matrix = NULL, *filters = NULL;
|
||||
int i, force_fps = 0, top_field_first = -1;
|
||||
int i;
|
||||
|
||||
MATCH_PER_STREAM_OPT(frame_rates, str, frame_rate, oc, st);
|
||||
if (frame_rate && av_parse_video_rate(&ost->frame_rate, frame_rate) < 0) {
|
||||
@ -3324,11 +3322,10 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc)
|
||||
if (forced_key_frames)
|
||||
parse_forced_key_frames(forced_key_frames, ost, video_enc);
|
||||
|
||||
MATCH_PER_STREAM_OPT(force_fps, i, force_fps, oc, st);
|
||||
ost->force_fps = force_fps;
|
||||
MATCH_PER_STREAM_OPT(force_fps, i, ost->force_fps, oc, st);
|
||||
|
||||
MATCH_PER_STREAM_OPT(top_field_first, i, top_field_first, oc, st);
|
||||
ost->top_field_first = top_field_first;
|
||||
ost->top_field_first = -1;
|
||||
MATCH_PER_STREAM_OPT(top_field_first, i, ost->top_field_first, oc, st);
|
||||
|
||||
MATCH_PER_STREAM_OPT(copy_initial_nonkeyframes, i, ost->copy_initial_nonkeyframes, oc ,st);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user