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

Alex Cohn alexcohn at netvision.net.il
Mon Dec 24 11:35:04 CET 2012

On Mon, Dec 24, 2012 at 7:26 AM, Navin <nkipe at tatapowersed.com> wrote:
> Actually I'm giving avipicture_fill a value. I didn't show that bit of the code.
> g_pFrameRGB = avcodec_alloc_frame_proc();

Yes, this should be correct.

> But it's strange that purify is showing an error while reading from data[0][0].

Actually, after your call to avpicture_fill_proc(), data[0] is
pointing to pbuffer[0]. You didn't disclose how you initialized
pbuffer, so it's impossible to tell why Purify is unhappy with this

By the way, I don't understand the rationale of allocating another
chunk of memory, pAreaInMemory. Whatever you do with these bytes, why
don't you use pbuffer directly?


More information about the Libav-user mailing list