diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2021-06-05 03:47:02 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-06-30 10:37:21 +0300 |
commit | 7eb3e77b94f51bdeee719425ec4a533f662c5edd (patch) | |
tree | 03ba0461fd2337aaa237530b59d72031df899872 /source/blender/sequencer | |
parent | 13ab6b7bb60c3af82c6f99c2177f2fb2576ccd22 (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/sequencer')
-rw-r--r-- | source/blender/sequencer/intern/render.c | 2 | ||||
-rw-r--r-- | source/blender/sequencer/intern/strip_add.c | 3 |
2 files changed, 0 insertions, 5 deletions
diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c index f892f1c1b41..d6e4ea373e1 100644 --- a/source/blender/sequencer/intern/render.c +++ b/source/blender/sequencer/intern/render.c @@ -1111,8 +1111,6 @@ static ImBuf *seq_render_movie_strip_view(const SeqRenderData *context, ImBuf *ibuf = NULL; IMB_Proxy_Size psize = SEQ_rendersize_to_proxysize(context->preview_render_size); - IMB_anim_set_preseek(sanim->anim, seq->anim_preseek); - if (SEQ_can_use_proxy(context, seq, psize)) { /* Try to get a proxy image. * Movie proxies are handled by ImBuf module with exception of `custom file` setting. */ diff --git a/source/blender/sequencer/intern/strip_add.c b/source/blender/sequencer/intern/strip_add.c index 1106f47c477..63b0edc2706 100644 --- a/source/blender/sequencer/intern/strip_add.c +++ b/source/blender/sequencer/intern/strip_add.c @@ -549,7 +549,6 @@ Sequence *SEQ_add_movie_strip(Main *bmain, Scene *scene, ListBase *seqbase, SeqL seq->blend_mode = SEQ_TYPE_CROSS; /* so alpha adjustment fade to the strip below */ if (anim_arr[0] != NULL) { - seq->anim_preseek = IMB_anim_get_preseek(anim_arr[0]); seq->len = IMB_anim_get_duration(anim_arr[0], IMB_TC_RECORD_RUN); IMB_anim_load_metadata(anim_arr[0]); @@ -691,8 +690,6 @@ void SEQ_add_reload_new_file(Main *bmain, Scene *scene, Sequence *seq, const boo seq->len = IMB_anim_get_duration( sanim->anim, seq->strip->proxy ? seq->strip->proxy->tc : IMB_TC_RECORD_RUN); - seq->anim_preseek = IMB_anim_get_preseek(sanim->anim); - seq->len -= seq->anim_startofs; seq->len -= seq->anim_endofs; if (seq->len < 0) { |