summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtem Dyomin <artem.dyomin@qt.io>2024-05-03 10:39:38 +0200
committerArtem Dyomin <artem.dyomin@qt.io>2024-05-03 16:21:27 +0200
commitceafdc0436e5ab3fccf64f0eb688bd0e0656fa7f (patch)
tree6fb7fd528131a8d87ea2879e4b0da3990a2d8f02
parent4b2cd17206453faba136152fb2bce47c17cef448 (diff)
Fix handling of the leftover packets in muxer upon cleanup
We handle the leftover frames in audio and video encoders, and we have to do the same for muxer to avoid missing written packets at the end. Pick-to: 6.7 6.5 Change-Id: Ib92f768abd5331f4abe33eb562bf6454039783ed Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
-rw-r--r--src/plugins/multimedia/ffmpeg/recordingengine/qffmpegmuxer.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/multimedia/ffmpeg/recordingengine/qffmpegmuxer.cpp b/src/plugins/multimedia/ffmpeg/recordingengine/qffmpegmuxer.cpp
index 8d5ca420a..2df594017 100644
--- a/src/plugins/multimedia/ffmpeg/recordingengine/qffmpegmuxer.cpp
+++ b/src/plugins/multimedia/ffmpeg/recordingengine/qffmpegmuxer.cpp
@@ -37,7 +37,11 @@ void Muxer::init()
qCDebug(qLcFFmpegMuxer) << "Muxer::init started thread.";
}
-void Muxer::cleanup() { }
+void Muxer::cleanup()
+{
+ while (!m_packetQueue.empty())
+ processOne();
+}
bool QFFmpeg::Muxer::hasData() const
{