1
0
Fork 0

Silently error out when pos_limit exceeds pos_max instead of aborting the process.

This commit is contained in:
Hendrik Leppkes 2012-03-04 08:51:58 +01:00
parent 34a33b5144
commit d9955ce11b
Signed by: hendrik
GPG Key ID: 846079A4B0A7C1B5
1 changed files with 4 additions and 1 deletions

View File

@ -438,7 +438,10 @@ int64_t ff_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts,
av_log(s, AV_LOG_TRACE,
"pos_min=0x%"PRIx64" pos_max=0x%"PRIx64" dts_min=%s dts_max=%s\n",
pos_min, pos_max, av_ts2str(ts_min), av_ts2str(ts_max));
av_assert0(pos_limit <= pos_max);
if (pos_limit > pos_max) {
av_log(s, AV_LOG_ERROR, "pos_limit (0x%"PRIx64") > pos_max (0x%"PRIx64"), pos (0x%"PRIx64")\n", pos_limit, pos_max, pos);
return -1;
}
if (no_change == 0) {
int64_t approximate_keyframe_distance = pos_max - pos_limit;