[FFmpeg-cvslog] examples/muxing: fix bogus setting of st->id
Stefano Sabatini
git at videolan.org
Wed Oct 17 21:50:09 CEST 2012
ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Wed Oct 17 11:08:18 2012 +0200| [d6196d9421913b8805c58b104649fc4b0917b6f3] | committer: Stefano Sabatini
examples/muxing: fix bogus setting of st->id
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d6196d9421913b8805c58b104649fc4b0917b6f3
---
doc/examples/muxing.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c
index 78a079e..22bbeca 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);
More information about the ffmpeg-cvslog
mailing list