OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ca298d
)
examples/muxing: fix bogus setting of st->id
author
Stefano Sabatini
<stefasab@gmail.com>
Wed, 17 Oct 2012 09:08:18 +0000
(11:08 +0200)
committer
Stefano Sabatini
<stefasab@gmail.com>
Wed, 17 Oct 2012 19:39:12 +0000
(21:39 +0200)
doc/examples/muxing.c
patch
|
blob
|
history
diff --git
a/doc/examples/muxing.c
b/doc/examples/muxing.c
index
78a079e
..
22bbeca
100644
(file)
--- 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);