From 759e96164a8d3f0f3f5606ab5f4801859899dd50 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 6 Dec 2012 21:08:24 +0000 Subject: Fix #33433: Importing video files into movie clip editor crashes Blender This was a regression in svn rev52718 caused by the fact that we can not free packet fun until we've finished all manipulation with decoded frame since frame and packet could share same pointers. For now restored old behavior of next_packet which seems to be well tested and better not do bigger refactoring here so close to release. Memory leak fixed by that revision was fixed by calling av_free_packet just before avcodec_decode_video2 in cases we're at the end of file. Tested with valgrind and could not see any memory leaks in ffmpeg area. --- source/blender/imbuf/intern/IMB_anim.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/imbuf/intern/IMB_anim.h') diff --git a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h index 684a1476e44..ed349e8f7eb 100644 --- a/source/blender/imbuf/intern/IMB_anim.h +++ b/source/blender/imbuf/intern/IMB_anim.h @@ -178,6 +178,7 @@ struct anim { struct ImBuf *last_frame; int64_t last_pts; int64_t next_pts; + AVPacket next_packet; #endif #ifdef WITH_REDCODE -- cgit v1.2.3