pub unsafe extern "C" fn avformat_init_output(
s: *mut AVFormatContext,
options: *mut *mut AVDictionary,
) -> i32
Expand description
Allocate the stream private data and initialize the codec, but do not write the header. May optionally be used before avformat_write_header() to initialize stream parameters before actually writing the header. If using this function, do not pass the same options to avformat_write_header().
@param s Media file handle, must be allocated with avformat_alloc_context(). Its \ref AVFormatContext.oformat “oformat” field must be set to the desired output format; Its \ref AVFormatContext.pb “pb” field must be set to an already opened ::AVIOContext. @param options An ::AVDictionary filled with AVFormatContext and muxer-private options. On return this parameter will be destroyed and replaced with a dict containing options that were not found. May be NULL.
@retval AVSTREAM_INIT_IN_WRITE_HEADER On success, if the codec requires avformat_write_header to fully initialize. @retval AVSTREAM_INIT_IN_INIT_OUTPUT On success, if the codec has been fully initialized. @retval AVERROR Anegative AVERROR on failure.
@see av_opt_find, av_dict_set, avio_open, av_oformat_next, avformat_write_header.