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);
AVFormatContext *s
Media file handle, a pointer to a AVFormatContext.
AVPacket *pkt
The AVPacket, which contains the stream_index, buf/buf_size, dts/pts, …
Returns < 0 if error, = 0 if OK, 1 if end of stream wanted.