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:
parent
546fa9a759
commit
7faf5b0e02
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue