1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

lavf: rewrite the av_write_frame() doxy

Remove some vague / incorrect statements and make the text more specific
and less confusing.
This commit is contained in:
Anton Khirnov 2014-02-04 15:46:51 +01:00
parent ad7f2b69a5
commit 4c75059950

View File

@ -1439,18 +1439,34 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options);
/** /**
* Write a packet to an output media file. * Write a packet to an output media file.
* *
* The packet shall contain one audio or video frame. * This function passes the packet directly to the muxer, without any buffering
* The packet must be correctly interleaved according to the container * or reordering. The caller is responsible for correctly interleaving the
* specification, if not then av_interleaved_write_frame must be used. * packets if the format requires it. Callers that want libavformat to handle
* the interleaving should call av_interleaved_write_frame() instead of this
* function.
* *
* @param s media file handle * @param s media file handle
* @param pkt The packet, which contains the stream_index, buf/buf_size, * @param pkt @parblock
* dts/pts, ... * The packet containing the data to be written. Note that unlike
* This can be NULL (at any time, not just at the end), in * av_interleaved_write_frame(), this function does not take
* order to immediately flush data buffered within the muxer, * ownership of the packet passed to it (though some muxers may make
* for muxers that buffer up data internally before writing it * an internal reference to the input packet).
* to the output. *
* This parameter can be NULL (at any time, not just at the end), in
* order to immediately flush data buffered within the muxer, for
* muxers that buffer up data internally before writing it to the
* output.
*
* Packet's @ref AVPacket.stream_index "stream_index" field must be
* set to the index of the corresponding stream in @ref
* AVFormatContext.streams "s->streams". It is very strongly
* recommended that timing information (@ref AVPacket.pts "pts", @ref
* AVPacket.dts "dts", @ref AVPacket.duration "duration") is set to
* correct values.
* @endparblock
* @return < 0 on error, = 0 if OK, 1 if flushed and there is no more data to flush * @return < 0 on error, = 0 if OK, 1 if flushed and there is no more data to flush
*
* @see av_interleaved_write_frame()
*/ */
int av_write_frame(AVFormatContext *s, AVPacket *pkt); int av_write_frame(AVFormatContext *s, AVPacket *pkt);