[Libav-user] Array bounds error while reading from ffmpeg data array using Purify

Alex Cohn alexcohn at netvision.net.il
Tue Dec 18 10:27:38 CET 2012

On Mon, Dec 17, 2012 at 12:19 PM, Navin <nkipe at tatapowersed.com> wrote:
> So I reduced the code to just this
> pAreaInMemory[0] = g_pFrameRGB->data[0][0];
> and I'm still getting the error (which I've shown above).
> The code goes something like this (I've shown many of the initializations in
> GetFrame itself although they're supposed to be outside):
> bool GetFrame()
> {
>    ...blah...
>    AVFrame*  g_pFrameRGB = NULL;
>    avpicture_fill_proc((AVPicture *) g_pFrameRGB, pbuffer, PIX_FMT_RGB24,
> g_metadata->WIDTH, g_metadata->HEIGHT);

avipicture_fill does not expect NULL pointer to AVPicture as first
parameter. The pointer must be initialized (see doc/examples/muxing.c
for the correct usage).


More information about the Libav-user mailing list