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

Reimar Döffinger Reimar.Doeffinger
Sun May 2 16:52:46 CEST 2010

On Sun, May 02, 2010 at 04:44:14PM +0200, Cyril Russo wrote:
> Le 02/05/2010 15:55, Reimar D?ffinger a ?crit :
> >Not reading from *picture means it can't access the picture->data
> >passed in to it, so allocating it beforehand makes no sense.
> I disagree. It doesn't have to read picture->data even if it's
> allocated beforehand.
> memcpy(picture->data[0], decoded_data, size); // Doesn't read data[0]

Look, I don't disagree with your documentation improvements, but
statements like this make you look quite clueless.
How in the world do you think memcpy could copy data to location
_stored in the pointer in data[0]_ without _reading_ data[0]?

> >Let me clarify: I meant adding to the function documentation
> >"*picture is initialized and allocated by this function"
> >No idea if that is any clearer than your explanation.
> Ok, attached.

Well, I wanted to know from you if you think it is any good,
I'm not convinced it is.
However if nobody else has a comment I'll just apply a random one

More information about the ffmpeg-devel mailing list