mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-12 17:50:00 +00:00
examples/muxing: fix bogus setting of st->id
This commit is contained in:
parent
5ca298df2d
commit
d6196d9421
@ -73,8 +73,7 @@ static AVStream *add_audio_stream(AVFormatContext *oc, AVCodec **codec,
|
|||||||
fprintf(stderr, "Could not allocate stream\n");
|
fprintf(stderr, "Could not allocate stream\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
st->id = 1;
|
st->id = oc->nb_streams-1;
|
||||||
|
|
||||||
c = st->codec;
|
c = st->codec;
|
||||||
|
|
||||||
/* put sample parameters */
|
/* put sample parameters */
|
||||||
@ -208,7 +207,7 @@ static AVStream *add_video_stream(AVFormatContext *oc, AVCodec **codec,
|
|||||||
fprintf(stderr, "Could not alloc stream\n");
|
fprintf(stderr, "Could not alloc stream\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
st->id = oc->nb_streams-1;
|
||||||
c = st->codec;
|
c = st->codec;
|
||||||
|
|
||||||
avcodec_get_context_defaults3(c, *codec);
|
avcodec_get_context_defaults3(c, *codec);
|
||||||
|
Loading…
Reference in New Issue
Block a user