diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-02-10 13:47:01 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-02-10 13:51:56 +0100 |
commit | 6fd7ea44b2e1b517d7ac9e75d98f85ac7d9c9b27 (patch) | |
tree | 270f779fe092ab0006d37a1e7fe03392b05f2cdc | |
parent | 58fdc6db6c726378e4c5fa0977ce4602c413bd2a (diff) | |
parent | 4c750599509c3973afbe2850953a1fb963f696e5 (diff) | |
download | ffmpeg-6fd7ea44b2e1b517d7ac9e75d98f85ac7d9c9b27.tar.gz |
Merge commit '4c750599509c3973afbe2850953a1fb963f696e5'
* commit '4c750599509c3973afbe2850953a1fb963f696e5':
lavf: rewrite the av_write_frame() doxy
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/avformat.h | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index f2cbc275ce..91a1118868 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1935,18 +1935,34 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options); /** * 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. + * This function passes the packet directly to the muxer, without any buffering + * or reordering. The caller is responsible for correctly interleaving the + * 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 pkt The packet, which contains the stream_index, buf/buf_size, - * dts/pts, ... - * This 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. + * @param pkt @parblock + * The packet containing the data to be written. Note that unlike + * av_interleaved_write_frame(), this function does not take + * ownership of the packet passed to it (though some muxers may make + * an internal reference to the input packet). + * + * 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 + * + * @see av_interleaved_write_frame() */ int av_write_frame(AVFormatContext *s, AVPacket *pkt); |