From: Joseph A. <jo...@mi...> - 2013-05-13 16:09:44
|
This time it's a runtime issue. When avcodec_encode_video2() is called, we pass it an AVPacket with pkt.data pointing to a buffer we've allocated ourselves. Now, an AVPacket can be a managed one (requiring a call to av_free_packet()) or an unmanaged one (backed by some external buffer AVPacket doesn't own). Since very recently, some codecs (in this case it was ProRes, with multithreading enabled) started converting an unmanaged AVPacket we pass to avcodec_encode_video2() to a managed one. As a result, the "data" member get overwritten and a call to av_packet_free() is now required. BTW, calling av_packet_free() on an unmanaged AVPacket is still fine. The fix is attached. -- Joseph Artsimovich Senior C++ Applications Developer MirriAd Ltd |