70 hi = ts_hi * tb_hi.
num * tb_lo.
den;
71 lo = ts_lo * tb_lo.
num * tb_hi.
den;
102 int keyframes_to_find,
112 int terminated_count = 0;
124 if (sp->
pos_hi == INT64_MAX) {
127 sp->
ts_hi = INT64_MAX;
128 sp->
pos_hi = INT64_MAX - 1;
193 if (sp->
pos_hi == INT64_MAX) {
196 sp->
ts_hi = INT64_MAX;
197 sp->
pos_hi = INT64_MAX - 1;
199 if (terminated_count == keyframes_to_find)
207 if (sp->
pos_lo == INT64_MAX) {
212 }
else if (sp->
ts_lo < ts) {
220 if (sp->
pos_hi == INT64_MAX) {
225 if (*found_hi >= keyframes_to_find && first_iter) {
231 }
else if (sp->
ts_hi > ts) {
255 int keyframes_to_find = 0;
258 int found_lo = 0, found_hi = 0;
269 if (stream_index >= 0) {
291 sp->
ts_lo = INT64_MAX;
293 sp->
ts_hi = INT64_MAX;
306 if (!keyframes_to_find) {
315 curpos =
FFMAX(pos - step / 2, 0);
323 &found_lo, &found_hi,
325 if (found_lo == keyframes_to_find && found_hi == keyframes_to_find)
360 min_distance = INT64_MAX;
362 if (sp->
pos_lo != INT64_MAX
369 if (sp->
pos_hi != INT64_MAX
374 if (distance < min_distance) {
379 if (min_distance == INT64_MAX) {