|
|
|
@ -754,8 +754,6 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e |
|
|
|
|
char *bsf = NULL, *next, *codec_tag = NULL; |
|
|
|
|
AVBitStreamFilterContext *bsfc, *bsfc_prev = NULL; |
|
|
|
|
double qscale = -1; |
|
|
|
|
char *buf = NULL, *arg = NULL, *preset = NULL; |
|
|
|
|
AVIOContext *s = NULL; |
|
|
|
|
|
|
|
|
|
if (!st) { |
|
|
|
|
av_log(NULL, AV_LOG_FATAL, "Could not alloc stream.\n"); |
|
|
|
@ -777,11 +775,10 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e |
|
|
|
|
st->codec->codec_type = type; |
|
|
|
|
choose_encoder(o, oc, ost); |
|
|
|
|
if (ost->enc) { |
|
|
|
|
ost->opts = filter_codec_opts(codec_opts, ost->enc->id, oc, st, ost->enc); |
|
|
|
|
} |
|
|
|
|
AVIOContext *s = NULL; |
|
|
|
|
char *buf = NULL, *arg = NULL, *preset = NULL; |
|
|
|
|
|
|
|
|
|
avcodec_get_context_defaults3(st->codec, ost->enc); |
|
|
|
|
st->codec->codec_type = type; // XXX hack, avcodec_get_context_defaults2() sets type to unknown for stream copy
|
|
|
|
|
ost->opts = filter_codec_opts(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)))) { |
|
|
|
@ -807,6 +804,10 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e |
|
|
|
|
preset, ost->file_index, ost->index); |
|
|
|
|
exit(1); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
avcodec_get_context_defaults3(st->codec, ost->enc); |
|
|
|
|
st->codec->codec_type = type; // XXX hack, avcodec_get_context_defaults2() sets type to unknown for stream copy
|
|
|
|
|
|
|
|
|
|
ost->max_frames = INT64_MAX; |
|
|
|
|
MATCH_PER_STREAM_OPT(max_frames, i64, ost->max_frames, oc, st); |
|
|
|
|