[FFmpeg-devel] [PATCH 1/2] avformat/aviobuf: Remove dead check
Andreas Rheinhardt
andreas.rheinhardt at gmail.com
Tue May 14 11:49:48 EEST 2019
avio_seek only accepts SEEK_CUR and SEEK_SET (possibly OR'ed with
AVSEEK_FORCE) as whence parameter. Therefore the check
"whence != SEEK_END || force" is always true and can be removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
libavformat/aviobuf.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 5a33f82950..5c01423a2e 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -290,8 +290,7 @@ int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
} else if ((!(s->seekable & AVIO_SEEKABLE_NORMAL) ||
offset1 <= buffer_size + short_seek) &&
!s->write_flag && offset1 >= 0 &&
- (!s->direct || !s->seek) &&
- (whence != SEEK_END || force)) {
+ (!s->direct || !s->seek)) {
while(s->pos < offset && !s->eof_reached)
fill_buffer(s);
if (s->eof_reached)
--
2.21.0
More information about the ffmpeg-devel
mailing list