diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-02-04 20:48:47 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-02-04 20:48:55 +0300 |
commit | f75d2fdd24ed0a8633682dadd57ca9b9929dd4f4 (patch) | |
tree | 89a2f1e171e7f0bbd98c9fe348ebdee647ef9203 /source/blender/imbuf | |
parent | 4339caf7cb95340dcdc7c050af46916ed1b34811 (diff) |
Port fix from gooseberry that doesn't load the full res file if a proxy
is requested.
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r-- | source/blender/imbuf/intern/anim_movie.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c index b8f6e66adfe..ffdecb793aa 100644 --- a/source/blender/imbuf/intern/anim_movie.c +++ b/source/blender/imbuf/intern/anim_movie.c @@ -1314,25 +1314,27 @@ struct ImBuf *IMB_anim_absolute(struct anim *anim, int position, filter_y = (anim->ib_flags & IB_animdeinterlace); - if (anim->curtype == 0) { - ibuf = anim_getnew(anim); - if (ibuf == NULL) { - return(NULL); + if (preview_size == IMB_PROXY_NONE) { + if (anim->curtype == 0) { + ibuf = anim_getnew(anim); + if (ibuf == NULL) { + return(NULL); + } + + IMB_freeImBuf(ibuf); /* ???? */ + ibuf = NULL; } - IMB_freeImBuf(ibuf); /* ???? */ - ibuf = NULL; + if (position < 0) return(NULL); + if (position >= anim->duration) return(NULL); } - - if (position < 0) return(NULL); - if (position >= anim->duration) return(NULL); - - if (preview_size != IMB_PROXY_NONE) { + else { struct anim *proxy = IMB_anim_open_proxy(anim, preview_size); if (proxy) { position = IMB_anim_index_get_frame_index( anim, tc, position); + return IMB_anim_absolute( proxy, position, IMB_TC_NONE, IMB_PROXY_NONE); |