Skip to content

Commit

Permalink
Movieclip: Use first clip frame for size detection
Browse files Browse the repository at this point in the history
Using scene frame 1 is not reliable in cases when there is a
frame offset is involved. Using frame 1 seems more reliable,
although might still fail under certain circumstances.

More reliable fix would require a deeper change in the data
structure and the logic about frame loading and size detection.
  • Loading branch information
sergeyvfx committed May 3, 2021
1 parent 2f615ad commit 0ac6852
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/blender/blenkernel/intern/movieclip.c
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ static void movieclip_load_get_size(MovieClip *clip)
int width, height;
MovieClipUser user = {0};

user.framenr = 1;
user.framenr = BKE_movieclip_remap_clip_to_scene_frame(clip, 1);
BKE_movieclip_get_size(clip, &user, &width, &height);

if (width && height) {
Expand Down

0 comments on commit 0ac6852

Please sign in to comment.