Fix T39545: "Track selected markers", does not stop at end of video

Issue was cauzed by some weird clamping of current frame. Not sure
why it was here at the first point -- it's from the day0 of movie
clip datablock.
This commit is contained in:
Sergey Sharybin 2014-04-02 14:07:44 +06:00
parent def5999f9b
commit eed3974d11
Notes: blender-bot 2023-03-24 17:05:22 +01:00
Referenced by issue #39560, Segfault in src/blender/imbuf/intern/colormanagement.c, line 650 (config = OCIO_configCreateFromFile(configfile)) in colormanagement_init on Debian jessie
Referenced by issue #39545, "Track selected markers", does not stop at end of video
1 changed files with 2 additions and 11 deletions

View File

@ -280,17 +280,8 @@ static ImBuf *movieclip_load_movie_file(MovieClip *clip, MovieClipUser *user, in
movieclip_open_anim_file(clip);
if (clip->anim) {
int dur;
int fra;
dur = IMB_anim_get_duration(clip->anim, tc);
fra = framenr - clip->start_frame + clip->frame_offset;
if (fra < 0)
fra = 0;
if (fra > (dur - 1))
fra = dur - 1;
int dur = IMB_anim_get_duration(clip->anim, tc);
int fra = framenr - clip->start_frame + clip->frame_offset;
ibuf = IMB_anim_absolute(clip->anim, fra, tc, proxy);
}