[Ffmpeg-devel] Re: img_convert crashes

Luca Abeni lucabe72
Thu Aug 24 23:56:54 CEST 2006

Hi Denis,

On Thu, 2006-08-24 at 09:05 +0200, Mohnhaupt, Denis wrote:
> for better clarification i will paste the full code at the end of this
> mail.
I am still unable to compile your code obtaining a program that shows
the problem, but...
>     // Determine required buffer size and allocate buffer
>     numBytes=avpicture_get_size(PIX_FMT_RGB24, pCodecCtx->width,
>         pCodecCtx->height);
>     uint8_t buffer[numBytes];
I am not sure you can do this.
buffer will probably be incorrectly aligned, and this can potentially
cause the crash. Use av_alloc() instead.


More information about the ffmpeg-devel mailing list