summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Duponchelle <mathieu@centricular.com>2021-08-06 22:59:23 +0200
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-08-20 00:16:43 +0000
commitfa835d686f7edbaf9617f496a9fee3132577df42 (patch)
treee73b50fe6adfa3529fc0b8d35b8e984fbe4728d2
parente069824c7de530f8095fedce0820e846c72d466b (diff)
downloadgstreamer-plugins-good-fa835d686f7edbaf9617f496a9fee3132577df42.tar.gz
isomp4/qtmux: make sure to switch to next chunk on new caps
For example, with single video sink pad, and new codec_data is received, current_chunk_offset must be reset to -1 for the aggregate loop to open a new chunk. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1047>
-rw-r--r--gst/isomp4/gstqtmux.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gst/isomp4/gstqtmux.c b/gst/isomp4/gstqtmux.c
index dc30d711a..d93d06606 100644
--- a/gst/isomp4/gstqtmux.c
+++ b/gst/isomp4/gstqtmux.c
@@ -6872,6 +6872,14 @@ gst_qt_mux_sink_event (GstAggregator * agg, GstAggregatorPad * agg_pad,
caps);
} else {
ret = qtmux_pad->set_caps (qtmux_pad, caps);
+
+ GST_OBJECT_LOCK (qtmux);
+ if (qtmux->current_pad == qtmux_pad) {
+ qtmux->current_chunk_offset = -1;
+ qtmux->current_chunk_size = 0;
+ qtmux->current_chunk_duration = 0;
+ }
+ GST_OBJECT_UNLOCK (qtmux);
}
if (ret)