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