diff options
Diffstat (limited to 'avconv.c')
-rw-r--r-- | avconv.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -3016,7 +3016,7 @@ static int get_preset_file_2(const char *preset_name, const char *codec_name, AV static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, enum AVMediaType type) { OutputStream *ost; - AVStream *st = av_new_stream(oc, oc->nb_streams < o->nb_streamid_map ? o->streamid_map[oc->nb_streams] : 0); + 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; @@ -3030,6 +3030,9 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e exit_program(1); } + if (oc->nb_streams - 1 < o->nb_streamid_map) + st->id = o->streamid_map[oc->nb_streams - 1]; + output_streams = grow_array(output_streams, sizeof(*output_streams), &nb_output_streams, nb_output_streams + 1); ost = &output_streams[nb_output_streams - 1]; |