User Tools

Site Tools




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);



AVFormatContext *s

The media file handle, a pointer to a AVFormatContext.


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

ffmpeg/av_interleaved_write_frame.txt · Last modified: 2007/12/10 14:45 by deva