[FFmpeg-devel] [PATCH] Explicit avcodec_decode_video2 documentation about picture allocation

Michael Niedermayer michaelni
Sun May 2 12:17:47 CEST 2010


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

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100502/4b481733/attachment.pgp>



More information about the ffmpeg-devel mailing list