mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-02-25 12:29:16 -05:00
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:
parent
bb69d1488e
commit
7591146928
@ -1812,7 +1812,7 @@ impl FileInner {
|
|||||||
format_err_t!(NotFound, "{}: stream not found", s.s.id),
|
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))
|
Box::new(f.map_ok(Chunk::from).map_err(wrap_error))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user