Commit: 95fcb4184108aff91eb46f4192af5b0826e486a7 Author: Richard Antalik Date: Tue Feb 1 22:47:22 2022 +0100 Branches: blender-v3.1-release https://developer.blender.org/rB95fcb4184108aff91eb46f4192af5b0826e486a7
Fix T95378: Seek problems when timecodes are used Function `IMB_indexer_get_seek_pos()` can return non 0 seek position for frame index 0. This causes seeking to incorrect GOP and scanning ends with failiure. Hard-code first frame index seek position to 0. Differential Revision: https://developer.blender.org/D13974 =================================================================== M source/blender/imbuf/intern/indexer.c =================================================================== diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c index a85ba65d014..00e96e7840b 100644 --- a/source/blender/imbuf/intern/indexer.c +++ b/source/blender/imbuf/intern/indexer.c @@ -247,8 +247,10 @@ struct anim_index *IMB_indexer_open(const char *name) uint64_t IMB_indexer_get_seek_pos(struct anim_index *idx, int frame_index) { - if (frame_index < 0) { - frame_index = 0; + /* This is hard coded, because our current timecode files return non zero seek position for index + * 0. Only when seeking to 0 it is guaranteed, that first packet will be read. */ + if (frame_index <= 0) { + return 0; } if (frame_index >= idx->num_entries) { frame_index = idx->num_entries - 1; _______________________________________________ Bf-blender-cvs mailing list [email protected] List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
