Merge commit 'cb70a93ca1e7fae1b5dfb65ad149d311a65206a4'

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

Conflicts:
	libavcodec/avcodec.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-02-17 21:25:07 +01:00
commit 2980c8e7d3
1 changed files with 12 additions and 0 deletions

View File

@ -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.