Table of Contents

av_interleaved_write_frame

Overview

Defined in avformat.h

Writes a packet to an output media file ensuring correct interleaving.

The packet must contain one audio or video frame.
If the packets are already correctly interleaved the application should call av_write_frame() instead as it is slightly faster. It is also important to keep in mind that completely non-interleaved input will need huge amounts of memory to interleave with this, so it is preferable to interleave at the demuxer level.

int av_interleaved_write_frame(AVFormatContext *s,
                               AVPacket *pkt);

Parameters

s

AVFormatContext *s

The media file handle, a pointer to a AVFormatContext.

pkt

AVPacket *pkt

The AVPacket, which contains the stream_index, buf/buf_size, dts/pts, …

Return value

Returns < 0 if error, = 0 if OK, 1 if end of stream wanted.

See also

av_write_frame()


Back to ffmpeg