summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-25 11:02:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-25 11:02:32 +0200
commitc3c6999ea1c3fb412af58ebdc3a3da2b1828e68f (patch)
tree0ca9500f3681188714c9871680628bb7e35033b9 /libavcodec
parent9b3d4258d9f353662d72f541e5232a8e85450e88 (diff)
parent5f4b1b1cbd0604b74cacc0870b501659240b5b45 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: lavc doxy: document that avcodec_flush_buffers() invalidates decoded frames Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/avcodec.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index aa14431a8f..7b1f5ce948 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3799,8 +3799,8 @@ attribute_deprecated int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *s
* to the frame if av_frame_is_writable() returns 1.
* When AVCodecContext.refcounted_frames is set to 0, the returned
* reference belongs to the decoder and is valid only until the
- * next call to this function or until closing the decoder.
- * The caller may not write to it.
+ * next call to this function or until closing or flushing the
+ * decoder. The caller may not write to it.
* @param[out] got_frame_ptr Zero if no frame could be decoded, otherwise it is
* non-zero.
* @param[in] avpkt The input AVPacket containing the input buffer.
@@ -3848,8 +3848,8 @@ int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
* to the frame if av_frame_is_writable() returns 1.
* When AVCodecContext.refcounted_frames is set to 0, the returned
* reference belongs to the decoder and is valid only until the
- * next call to this function or until closing the decoder. The
- * caller may not write to it.
+ * next call to this function or until closing or flushing the
+ * decoder. The caller may not write to it.
*
* @param[in] avpkt The input AVPacket containing the input buffer.
* You can create such packet with av_init_packet() and by then setting
@@ -4692,7 +4692,13 @@ int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,
int buf_size, int align);
/**
- * Flush buffers, should be called when seeking or when switching to a different stream.
+ * Reset the internal decoder state / flush internal buffers. Should be called
+ * e.g. when seeking or when switching to a different stream.
+ *
+ * @note when refcounted frames are not used (i.e. avctx->refcounted_frames is 0),
+ * this invalidates the frames previously returned from the decoder. When
+ * refcounted frames are used, the decoder just releases any references it might
+ * keep internally, but the caller's reference remains valid.
*/
void avcodec_flush_buffers(AVCodecContext *avctx);