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

"René J.V. Bertin" rjvbertin at gmail.com
Tue Dec 18 13:02:31 CET 2012


On Dec 18, 2012, at 10:27, Alex Cohn wrote:

> 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).
> 

Doh, everyone could have seen that g_pFrameRGB can't possibly be initialised in the snippet above, so much for my general suggestions :)

R.



More information about the Libav-user mailing list