mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-23 02:26:35 +00:00
fmp4mux: Consider invalid running times as zero and before anything else
The code tried to do this before but didn't consider the case where the first pad has a valid running time, in which case the buffer with the invalid running time would never be dequeued and the muxer would never output anything.
This commit is contained in:
parent
2bb071a950
commit
84f6484140
1 changed files with 6 additions and 1 deletions
|
@ -225,7 +225,12 @@ impl FMP4Mux {
|
|||
let running_time = match segment.to_running_time(buffer.dts_or_pts()) {
|
||||
None => {
|
||||
gst::trace!(CAT, obj: &stream.sinkpad, "Stream has no valid running time");
|
||||
if earliest_stream.is_none() {
|
||||
if earliest_stream
|
||||
.as_ref()
|
||||
.map_or(true, |(_, _, earliest_running_time)| {
|
||||
*earliest_running_time > gst::ClockTime::ZERO
|
||||
})
|
||||
{
|
||||
earliest_stream = Some((idx, stream, gst::ClockTime::ZERO));
|
||||
}
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue