diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2021-06-05 03:47:02 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2021-06-05 03:48:09 +0300 |
commit | 14508ef100c9c6c67300ac480b32c88c0e134f25 (patch) | |
tree | ea9f0a1b22a4335428df9c845473cc15455b91f8 /source/blender/imbuf/intern/IMB_anim.h | |
parent | bfaf09b5bc97897eecf96cbc1b7aa46e6b38b4da (diff) |
FFmpeg: Fix seeking not returning the correct frame when not using TC index
Fixed the logic for seeking in ffmpeg video files.
The main fix is that we now apply a small offset in ffmpeg_get_seek_pos
to make sure we don't get the frame in front of the seek position when
seeking backward.
The rest of the changes is general cleanup and untangling code.
Reviewed By: Richard Antalik
Differential Revision: http://developer.blender.org/D11492
Diffstat (limited to 'source/blender/imbuf/intern/IMB_anim.h')
-rw-r--r-- | source/blender/imbuf/intern/IMB_anim.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h index 7d7864306a1..cfeffcca0ea 100644 --- a/source/blender/imbuf/intern/IMB_anim.h +++ b/source/blender/imbuf/intern/IMB_anim.h @@ -87,7 +87,7 @@ struct anim_index; struct anim { int ib_flags; int curtype; - int curposition; /* index 0 = 1e, 1 = 2e, enz. */ + int cur_position; /* index 0 = 1e, 1 = 2e, enz. */ int duration_in_frames; int frs_sec; double frs_sec_base; @@ -105,7 +105,6 @@ struct anim { int orientation; size_t framesize; int interlacing; - int preseek; int streamindex; /* avi */ @@ -132,10 +131,10 @@ struct anim { struct SwsContext *img_convert_ctx; int videoStream; - struct ImBuf *last_frame; - int64_t last_pts; - int64_t next_pts; - AVPacket *next_packet; + struct ImBuf *cur_frame_final; + int64_t cur_pts; + int64_t cur_key_frame_pts; + AVPacket *cur_packet; #endif char index_dir[768]; |