diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-09-11 02:51:09 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-11 03:02:51 +0200 |
commit | 8470e6c96fe510178d9d02d4617ee1481e4c4fea (patch) | |
tree | 90458b6664e82a4083aaacdbc679cde05a9d09fb /libavformat/utils.c | |
parent | 386d60f9783ac094dae6c3c9210e0469f98c9147 (diff) | |
download | ffmpeg-8470e6c96fe510178d9d02d4617ee1481e4c4fea.tar.gz |
lavf/avformat_seek_file: fix harmless integer overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 948fdcf863..bd22eecbf2 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2020,7 +2020,7 @@ int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int //Fallback to old API if new is not implemented but old is //Note the old has somewhat different semantics if (s->iformat->read_seek || 1) { - int dir = (ts - min_ts > (uint64_t)(max_ts - ts) ? AVSEEK_FLAG_BACKWARD : 0); + int dir = (ts - (uint64_t)min_ts > (uint64_t)max_ts - ts ? AVSEEK_FLAG_BACKWARD : 0); int ret = av_seek_frame(s, stream_index, ts, flags | dir); if (ret<0 && ts != min_ts && max_ts != ts) { ret = av_seek_frame(s, stream_index, dir ? max_ts : min_ts, flags | dir); |