Commit 2980c8e7 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'cb70a93c'

* commit 'cb70a93c':
  lavc: Document interaction between avcodec_open2() and decoding routines

Conflicts:
	libavcodec/avcodec.h
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 79216a18 cb70a93c
......@@ -3655,6 +3655,9 @@ void avcodec_free_frame(AVFrame **frame);
*
* @warning This function is not thread safe!
*
* @note Always call this function before using decoding routines (such as
* @ref avcodec_decode_video2()).
*
* @code
* avcodec_register_all();
* av_dict_set(&opts, "b", "2.5M", 0);
......@@ -4103,6 +4106,9 @@ attribute_deprecated int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *s
* larger than the actual read bytes because some optimized bitstream
* readers read 32 or 64 bits at once and could read over the end.
*
* @note The AVCodecContext MUST have been opened with @ref avcodec_open2()
* before packets may be fed to the decoder.
*
* @param avctx the codec context
* @param[out] frame The AVFrame in which to store decoded audio samples.
* The decoder will allocate a buffer for the decoded frame by
......@@ -4147,6 +4153,9 @@ int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
* between input and output, these need to be fed with avpkt->data=NULL,
* avpkt->size=0 at the end to return the remaining frames.
*
* @note The AVCodecContext MUST have been opened with @ref avcodec_open2()
* before packets may be fed to the decoder.
*
* @param avctx the codec context
* @param[out] picture The AVFrame in which the decoded video frame will be stored.
* Use av_frame_alloc() to get an AVFrame. The codec will
......@@ -4193,6 +4202,9 @@ int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
* returning subtitles. It is safe to flush even those decoders that are not
* marked with CODEC_CAP_DELAY, then no subtitles will be returned.
*
* @note The AVCodecContext MUST have been opened with @ref avcodec_open2()
* before packets may be fed to the decoder.
*
* @param avctx the codec context
* @param[out] sub The Preallocated AVSubtitle in which the decoded subtitle will be stored,
* must be freed with avsubtitle_free if *got_sub_ptr is set.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment