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()`
This commit is contained in:
Richard Antalik 2021-04-01 11:19:13 +02:00
parent 546fa9a759
commit 7faf5b0e02
1 changed files with 1 additions and 2 deletions

View File

@ -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 {