mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-22 11:30:59 +00:00
fmp4mux: Don't overflow negative composition offset calculation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/982>
This commit is contained in:
parent
ae4b49c668
commit
e3f645af19
1 changed files with 10 additions and 4 deletions
|
@ -1175,10 +1175,16 @@ impl FMP4Mux {
|
||||||
let pts = buffer.pts;
|
let pts = buffer.pts;
|
||||||
let dts = buffer.dts.unwrap();
|
let dts = buffer.dts.unwrap();
|
||||||
|
|
||||||
Some(i64::try_from((pts - dts).nseconds()).map_err(|_| {
|
Some(
|
||||||
gst::error!(CAT, obj: stream.sinkpad, "Too big PTS/DTS difference");
|
i64::try_from(
|
||||||
gst::FlowError::Error
|
(gst::Signed::Positive(pts) - gst::Signed::Positive(dts))
|
||||||
})?)
|
.nseconds(),
|
||||||
|
)
|
||||||
|
.map_err(|_| {
|
||||||
|
gst::error!(CAT, obj: stream.sinkpad, "Too big PTS/DTS difference");
|
||||||
|
gst::FlowError::Error
|
||||||
|
})?,
|
||||||
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
buffers.push_back(Buffer {
|
buffers.push_back(Buffer {
|
||||||
|
|
Loading…
Reference in a new issue