# HG changeset patch # User michael # Date 1244024721 0 # Node ID 48572d70c95f335a677fad3f5a6606f57bcff67b # Parent 2142607ddc2e8b9a4f2419c98461c08ca4dd4f07 Clarify the input AVPacket for avcodec_decode*() diff -r 2142607ddc2e -r 48572d70c95f avcodec.h --- a/avcodec.h Tue Jun 02 15:31:51 2009 +0000 +++ b/avcodec.h Wed Jun 03 10:25:21 2009 +0000 @@ -3215,6 +3215,9 @@ * @param[out] samples the output buffer * @param[in,out] frame_size_ptr the output buffer size in bytes * @param[in] avpkt The input AVPacket containing the input buffer. + * You can create such packet with av_init_packet() and by then setting + * data and size, some decoders might in addition need other fields. + * All decoders are designed to use the least fields possible though. * @return On error a negative value is returned, otherwise the number of bytes * used or zero if no frame could be decompressed. */ @@ -3268,6 +3271,10 @@ * @param avctx the codec context * @param[out] picture The AVFrame in which the decoded video frame will be stored. * @param[in] avpkt The input AVpacket containing the input buffer. + * You can create such packet with av_init_packet() and by then setting + * data and size, some decoders might in addition need other fields like + * flags&PKT_FLAG_KEY. All decoders are designed to use the least + * fields possible. * @param[in,out] got_picture_ptr Zero if no frame could be decompressed, otherwise, it is nonzero. * @return On error a negative value is returned, otherwise the number of bytes * used or zero if no frame could be decompressed.