Details
- Reviewers
Sergey Sharybin (sergey) - Maniphest Tasks
- T38440: Segmentation fault in MovieClipEditor
- Commits
- rBS5589016e2446: Fix T38440: Segmentation fault in Movie Clip Editor
rBAC5589016e2446: Fix T38440: Segmentation fault in Movie Clip Editor
rB5589016e2446: Fix T38440: Segmentation fault in Movie Clip Editor
Diff Detail
Event Timeline
This is incorrect fix, you're skipping two things:
- real_ibuf_size()` is to be called regardless SKIP_CACHE flag is passed. This is needed to initialize clip dimensions properly.
- You're skipping postprocessing, meaning movieclip_get_postprocessed_ibuf() will return wrong image.
Proper solution is to split put_postprocessed_frame_to_cache() into two pieces, one of which will do post-processing, and second one which will store post-processed buffer in cache.
| source/blender/blenkernel/intern/movieclip.c | ||
|---|---|---|
| 783 | I would call it postprocess_frame(). You're not making it, you're post-processing it. | |
| 795 | While you're on here, make it bool disable_red = (postprocess_flag & MOVIECLIP_DISABLE_RED) != 0 And same for all the rest of the channels. BKE_tracking_disable_channels() accepts bools, so passing ints could lead to some issues. Let's clean this up. | |
| 804 | This is rather weird, all the movie clip get_ibuf functions are to return referenced image buffer. Here you skip referencing which would lead to wrong user counter in the future? | |
| 893 | This could be simplified logic: ImBuf *tmpibuf = ibuf;
ibuf = make_postprocessed_frame(clip, user, tmpibuf, postprocess_flag);
IMB_freeImBuf(tmpibuf);
if (ibuf && (cache_flag & MOVIECLIP_CACHE_SKIP) == 0) {
put_frame_to_postprocessed_cache(...);
}This way you'll simplify put_frame_to_postprocessed_cache() a bit further. | |
Closed by commit rB5589016e2446 (authored by @Alex Babahin (tamerlan311), committed by @Sergey Sharybin (sergey)).