[FFmpeg-cvslog] lavc: clarify docs for avpkt->destruct

Michael Bradshaw git at videolan.org
Wed Jun 27 23:02:53 CEST 2012


ffmpeg | branch: master | Michael Bradshaw <mbradshaw at sorensonmedia.com> | Wed Jun 27 12:19:00 2012 -0600| [54942c238356f1e4c6fcce04b67f216dafd819c5] | committer: Michael Niedermayer

lavc: clarify docs for avpkt->destruct

avcodec_encode_audio2 docs are ambiguous about avpkt->destruct and imply
it gets reset.

Signed-off-by: Michael Bradshaw <mbradshaw at sorensonmedia.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=54942c238356f1e4c6fcce04b67f216dafd819c5
---

 libavcodec/avcodec.h |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 21a0ed9..625bdc6 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -4053,11 +4053,12 @@ int attribute_deprecated avcodec_encode_audio(AVCodecContext *avctx,
  *                  The user can supply an output buffer by setting
  *                  avpkt->data and avpkt->size prior to calling the
  *                  function, but if the size of the user-provided data is not
- *                  large enough, encoding will fail. All other AVPacket fields
- *                  will be reset by the encoder using av_init_packet(). If
- *                  avpkt->data is NULL, the encoder will allocate it.
- *                  The encoder will set avpkt->size to the size of the
- *                  output packet.
+ *                  large enough, encoding will fail. If avpkt->data and
+ *                  avpkt->size are set, avpkt->destruct must also be set. All
+ *                  other AVPacket fields will be reset by the encoder using
+ *                  av_init_packet(). If avpkt->data is NULL, the encoder will
+ *                  allocate it. The encoder will set avpkt->size to the size
+ *                  of the output packet.
  *
  *                  If this function fails or produces no output, avpkt will be
  *                  freed using av_free_packet() (i.e. avpkt->destruct will be



More information about the ffmpeg-cvslog mailing list