[Ffmpeg-devel] avcodec.dll crash using H.263

Martyn mcantale
Wed Jan 4 22:42:41 CET 2006


Hi all,

I've successfully compiled the latest version of libavcodec using MinGW and MSYS
but a very small test application built using VC 2005 crashes calling the
avcodec_open() function when specifying CODEC_ID_H263 with the following error:

"HEAP[ffmpegTest.exe]: Invalid Address specified to RtlReAllocateHeap( 00650000,
00ADCBAF )
Windows has triggered a breakpoint in ffmpegTest.exe.

This may be due to a corruption of the heap, and indicates a bug in
ffmpegTest.exe or any of the DLLs it has loaded."

The code was as following:

   avcodec_init();
   avcodec_register_all();

   AVCodec* pCodec = avcodec_find_decoder(CODEC_ID_H263);
   AVCodecContext* pContext = avcodec_alloc_context();
   
   // crashes calling the next function...
   // 
   if (avcodec_open(pContext, pCodec) < 0)
   {
      return false;
   }

   avcodec_close(pContext);

I don't see the crash if I replace CODEC_ID_H263 with CODEC_ID_MPEG2VIDEO.

Does anyone have ANY idea how to fix this??

Many thanks in advance.






More information about the ffmpeg-devel mailing list