[FFmpeg-devel] [PATCH] Explicit avcodec_decode_video2 documentation about picture allocation
Reimar Döffinger
Reimar.Doeffinger
Sun May 2 12:29:40 CEST 2010
On Sun, May 02, 2010 at 12:17:47PM +0200, Michael Niedermayer wrote:
> On Sun, May 02, 2010 at 10:57:45AM +0200, Cyril Russo wrote:
> > Hi all,
> >
> > It's not obvious to libavcodec's user like me that the picture passed in
> > avcodec_decode_video2 shouldn't be allocated beforehand.
> > The patch specify this so it's no more a guess & try approach.
> >
> > Regards,
>
> > avcodec.h | 2 ++
> > 1 file changed, 2 insertions(+)
> > 416506465def4c87c7de0cfff21dc9b71ef47f09 allocationHelp.patch
> > Index: libavcodec/avcodec.h
> > ===================================================================
> > --- libavcodec/avcodec.h (revision 23005)
> > +++ libavcodec/avcodec.h (working copy)
> > @@ -3470,6 +3470,8 @@
> > * flags&AV_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.
> > + * @warning The given picture's internal is allocated so you shouldn't call
> > + * avpicture_alloc on it before calling this function.
>
> this should be in (readable) english be added to the dox of the picture param
> not be a seperate warning
While I don't object to any clarification, I'd like to point out that this
is already documented:
@param[out] picture
picture is only an output parameter, not input.
More information about the ffmpeg-devel
mailing list