Commit 7329f2c2 authored by Niklas Haas's avatar Niklas Haas
Browse files

utils/frame_queue: guard against future PTS

Fixes at least one abort() by turning it into a more reasonable
fallback to zOH semantics.

Not the proper solution to #133, but better than crashing.
parent 46ab5528
Pipeline #81921 passed with stages
in 8 minutes and 43 seconds
......@@ -371,7 +371,7 @@ static enum pl_queue_status oversample(struct pl_queue *p, struct pl_frame_mix *
return ret;
// Can't oversample with only a single frame, fall back to ZOH semantics
if (p->queue.num < 2)
if (p->queue.num < 2 || p->queue.elem[0].src.pts > params->pts)
return nearest(p, mix, params);
struct entry *entries[2] = { &p->queue.elem[0], &p->queue.elem[1] };
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment