Table of Contents

av_write_frame

Overview

Defined in avformat.h

Write a packet to an output media file.

The packet shall contain one audio or video frame.
The packet must be correctly interleaved according to the container specification, if not then av_interleaved_write_frame must be used.

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

Parameters

s

AVFormatContext *s

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_interleaved_write_frame()


Back to ffmpeg