I've got a similar problem !

----- Original Message ----- From: "Alexander Bokovikov" <[email protected]>
To: "Libav* user questions and discussions" <[email protected]>
Sent: Tuesday, November 10, 2009 5:38 PM
Subject: [libav-user] libavcodec - Memory allocation problem in DLL


Hi, All,

I've created pretty simple DLL, based on api-example. It uses FLV1 codec. All works fine unless I use ANY memory allocation in the _main_program_. I tried several approaches and now I suppose that something is wrong within the DLL. DLL has no explicit entry point and uses malloc() to get memory for picture_buf and outbuf. It all was done just as it was shown in api-example.c.

My question is - where could be the problem?
Maybe I must to make any explicit memory manager initialization in the DLL?
Or does MINGW do it for me internally?

The AV occures here:

   out_size = avcodec_encode_video(c, outbuf, out_size, picture);

It says "read of address "0xffffffff". And it only occurs if I insert ANY dummy GetMem() in my main project, which is calling this DLL. Main project is written in Delphi 7.

Any ideas?

Best regards,
Alex
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to