mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
ff_gen_search: fix infinite loop
Fixes Ticket2639 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
b3dd50cd0d
commit
f8ca8138f0
@ -1778,7 +1778,7 @@ int64_t ff_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts,
|
|||||||
pos_max = FFMAX(0, pos_max - step);
|
pos_max = FFMAX(0, pos_max - step);
|
||||||
ts_max = ff_read_timestamp(s, stream_index, &pos_max, limit, read_timestamp);
|
ts_max = ff_read_timestamp(s, stream_index, &pos_max, limit, read_timestamp);
|
||||||
step += step;
|
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)
|
if (ts_max == AV_NOPTS_VALUE)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user