Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-10-17 13:08:18 +0400
committerStefano Sabatini <stefasab@gmail.com>2012-10-17 23:39:12 +0400
commitd6196d9421913b8805c58b104649fc4b0917b6f3 (patch)
tree98a0a3f7fbcab2325caa0b70e5a5f02eb817a32e /doc
parent5ca298df2df80e9cb45a112386c1c5a847c288dd (diff)
examples/muxing: fix bogus setting of st->id
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/muxing.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c
index 78a079ec41..22bbeca136 100644
--- a/doc/examples/muxing.c
+++ b/doc/examples/muxing.c
@@ -73,8 +73,7 @@ static AVStream *add_audio_stream(AVFormatContext *oc, AVCodec **codec,
fprintf(stderr, "Could not allocate stream\n");
exit(1);
}
- st->id = 1;
-
+ st->id = oc->nb_streams-1;
c = st->codec;
/* put sample parameters */
@@ -208,7 +207,7 @@ static AVStream *add_video_stream(AVFormatContext *oc, AVCodec **codec,
fprintf(stderr, "Could not alloc stream\n");
exit(1);
}
-
+ st->id = oc->nb_streams-1;
c = st->codec;
avcodec_get_context_defaults3(c, *codec);