diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-02-17 21:25:07 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-17 21:25:07 +0100 |
commit | 2980c8e7d34e84f98b09965d208a583a16d5aded (patch) | |
tree | 7ce6ba4bf3489d1577f5ae82656641147a843fab /libavcodec/avcodec.h | |
parent | 79216a189b4e55dd3dbeb49612111061f2c2b717 (diff) | |
parent | cb70a93ca1e7fae1b5dfb65ad149d311a65206a4 (diff) | |
download | ffmpeg-2980c8e7d34e84f98b09965d208a583a16d5aded.tar.gz |
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>
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r-- | libavcodec/avcodec.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 982b5a8373..5e064327b4 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -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. |