diff options
author | Richard Antalik <richardantalik@gmail.com> | 2021-04-01 12:19:13 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2021-04-01 12:30:11 +0300 |
commit | 7faf5b0e02734313091b5672b861044ef90ea592 (patch) | |
tree | cf285944e8f9195e6079b80b9d6c5cb4088cf5be /source/blender/imbuf | |
parent | 546fa9a7593236cb6e387b15a2b7795ac0880271 (diff) |
Fix condition for ffmpeg seek workaround
This condition was in contradiction with comment for function
`ffmpeg_generic_seek_workaround()`.
I have noticed, that formats that seeked well used this workaround.
Problem was that I misunderstood code from `av_seek_frame()` - formats
with `read_seek()` function stil don't use generic seeking method.
This is defined in `seek_frame_internal()`
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r-- | source/blender/imbuf/intern/anim_movie.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c index 1d14f7567c4..6c63c1a1b5b 100644 --- a/source/blender/imbuf/intern/anim_movie.c +++ b/source/blender/imbuf/intern/anim_movie.c @@ -1219,8 +1219,7 @@ static void ffmpeg_seek_and_decode(struct anim *anim, int position, struct anim_ AVFormatContext *format_ctx = anim->pFormatCtx; - /* Condition based on av_seek_frame() code. */ - if (format_ctx->iformat->read_seek2 && !format_ctx->iformat->read_seek) { + if (format_ctx->iformat->read_seek2 || format_ctx->iformat->read_seek) { ret = av_seek_frame(anim->pFormatCtx, -1, pos, AVSEEK_FLAG_BACKWARD); } else { |