summaryrefslogtreecommitdiff
path: root/avconv.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-06-18 11:43:24 +0200
committerAnton Khirnov <anton@khirnov.net>2011-10-19 17:02:11 +0200
commit84ad31ff180fa089cd6bfd93c246336a16036455 (patch)
tree13dfd7e1445d6eafda50c6e3dd98030f464579af /avconv.c
parent3b3bbdd3e63a3a1eaf69b861f72cf74f1669afe1 (diff)
lavf: replace av_new_stream->avformat_new_stream part II.
Manual replacements are done in this commit. In many cases, the id is some constant made up number (e.g. 0 for video and 1 for audio), which is then not used in the demuxer for anything. Those ids are removed.
Diffstat (limited to 'avconv.c')
-rw-r--r--avconv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/avconv.c b/avconv.c
index 3c68ffc10b..8fc6fd1425 100644
--- a/avconv.c
+++ b/avconv.c
@@ -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];