pub unsafe extern "C" fn avformat_new_stream(
s: *mut AVFormatContext,
c: *const AVCodec,
) -> *mut AVStream
Expand description
Add a new stream to a media file.
When demuxing, it is called by the demuxer in read_header(). If the flag AVFMTCTX_NOHEADER is set in s.ctx_flags, then it may also be called in read_packet().
When muxing, should be called by the user before avformat_write_header().
User is required to call avformat_free_context() to clean up the allocation by avformat_new_stream().
@param s media file handle @param c unused, does nothing
@return newly created stream or NULL on error.