fix thinko in video sample chunk code

This caused served chunks to be truncated. On seek, nginx sometimes
served 502 errors, chrome sometimes returned
ERR_CONTENT_LENGTH_MISMATCH, and videos weren't playing properly.
This commit is contained in:
Scott Lamb 2021-06-04 23:10:13 -07:00
parent bb69d1488e
commit 7591146928

View File

@ -1812,7 +1812,7 @@ impl FileInner {
format_err_t!(NotFound, "{}: stream not found", s.s.id),
)))))
}
Some(d) => d.open_file(s.s.id, (r.start + sr.start)..(r.end + sr.start - r.start)),
Some(d) => d.open_file(s.s.id, (r.start + sr.start)..(r.end + sr.start)),
};
Box::new(f.map_ok(Chunk::from).map_err(wrap_error))
}