mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-09 18:55:27 +00:00
fmp4mux: Fix a couple of assertions by handling these cases cleaner
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1086>
This commit is contained in:
parent
adbb8b6495
commit
68bec4a0db
1 changed files with 6 additions and 8 deletions
|
@ -1271,9 +1271,10 @@ impl FMP4Mux {
|
||||||
gst::trace!(
|
gst::trace!(
|
||||||
CAT,
|
CAT,
|
||||||
obj: stream.sinkpad,
|
obj: stream.sinkpad,
|
||||||
"Draining up to end PTS {} / duration {}",
|
"Draining from {} up to end PTS {} / duration {}",
|
||||||
|
chunk_start_pts,
|
||||||
dequeue_end_pts,
|
dequeue_end_pts,
|
||||||
dequeue_end_pts - chunk_start_pts
|
dequeue_end_pts.saturating_sub(chunk_start_pts),
|
||||||
);
|
);
|
||||||
|
|
||||||
while let Some(gop) = stream.queued_gops.back() {
|
while let Some(gop) = stream.queued_gops.back() {
|
||||||
|
@ -1444,9 +1445,10 @@ impl FMP4Mux {
|
||||||
gst::trace!(
|
gst::trace!(
|
||||||
CAT,
|
CAT,
|
||||||
obj: stream.sinkpad,
|
obj: stream.sinkpad,
|
||||||
"Draining up to end PTS {} / duration {}",
|
"Draining from {} up to end PTS {} / duration {}",
|
||||||
|
chunk_start_pts,
|
||||||
dequeue_end_pts,
|
dequeue_end_pts,
|
||||||
dequeue_end_pts - chunk_start_pts
|
dequeue_end_pts.saturating_sub(chunk_start_pts),
|
||||||
);
|
);
|
||||||
|
|
||||||
while let Some(gop) = stream.queued_gops.back() {
|
while let Some(gop) = stream.queued_gops.back() {
|
||||||
|
@ -1769,9 +1771,6 @@ impl FMP4Mux {
|
||||||
if all_eos || stream.sinkpad.is_eos() {
|
if all_eos || stream.sinkpad.is_eos() {
|
||||||
// This is handled below generally if nothing was dequeued
|
// This is handled below generally if nothing was dequeued
|
||||||
} else {
|
} else {
|
||||||
// Otherwise this can only really happen on timeout in live pipelines.
|
|
||||||
assert!(timeout);
|
|
||||||
|
|
||||||
if settings.chunk_duration.is_some() {
|
if settings.chunk_duration.is_some() {
|
||||||
gst::warning!(
|
gst::warning!(
|
||||||
CAT,
|
CAT,
|
||||||
|
@ -2318,7 +2317,6 @@ impl FMP4Mux {
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
if err == gst_base::AGGREGATOR_FLOW_NEED_DATA {
|
if err == gst_base::AGGREGATOR_FLOW_NEED_DATA {
|
||||||
assert!(!all_eos);
|
assert!(!all_eos);
|
||||||
assert!(timeout);
|
|
||||||
gst::element_imp_warning!(
|
gst::element_imp_warning!(
|
||||||
self,
|
self,
|
||||||
gst::StreamError::Format,
|
gst::StreamError::Format,
|
||||||
|
|
Loading…
Reference in a new issue