Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-06-18 22:50:15 +0400
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-06-19 01:46:14 +0400
commitc0445df5b35947cf40abcb15ce6b39e404e20799 (patch)
treeac7ebd187dbe0a8d4f52e5b9cd744c00b7a34af4 /libavformat
parentc77b3737b9d1bdc27a7ac9ae8d5655c5bb000304 (diff)
ff_gen_search: fix infinite loop
Fixes Ticket2639 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit f8ca8138f01d0a7d96d4e1ea65fecd1197f96206)
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index d9c95cf999..ed83f28b0a 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1868,7 +1868,7 @@ int64_t ff_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts,
pos_max = FFMAX(0, pos_max - step);
ts_max = ff_read_timestamp(s, stream_index, &pos_max, limit, read_timestamp);
step += step;
- }while(ts_max == AV_NOPTS_VALUE && pos_max > 0);
+ }while(ts_max == AV_NOPTS_VALUE && 2*limit > step);
if (ts_max == AV_NOPTS_VALUE)
return -1;