Defined in avformat.h
Add a new stream to a media file.
Can only be called in the read_header() function. If the flag AVFMTCTX_NOHEADER is in the format context, then new streams can be added in av_read_packet() too.
AVStream *av_new_stream(AVFormatContext *s, int id);
AVFormatContext *s
Media file handle, contained in a AVFormatContext pointer.
int id
File format dependent stream id.
See av_find_default_stream_index() for more info.
A pointer to the new AVStream or NULL upon failure.