diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-06-17 11:55:11 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-06-17 14:06:53 +0000 |
commit | 0909959835b8f372fe298de66e2be5ecf64287c2 (patch) | |
tree | f96a452b3146335e8b741837ae8843cbd8c4b463 | |
parent | 3203150fd55edaf6277f833c09b13f17783c8410 (diff) |
Fix qSwap(QMediaFormat, QMediaFormat)
You need to swap all members.
Fixes: QTBUG-94565
Change-Id: I0decfb3ea033bc358c39618a36d77ca9e0972e84
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
(cherry picked from commit acc8628c3b4725170a1d6444f4c24118be49779d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/multimedia/qmediaformat.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/multimedia/qmediaformat.h b/src/multimedia/qmediaformat.h index 0a653a03a..68dc16103 100644 --- a/src/multimedia/qmediaformat.h +++ b/src/multimedia/qmediaformat.h @@ -130,7 +130,12 @@ public: QMediaFormat(QMediaFormat &&other) noexcept = default; QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QMediaFormat) void swap(QMediaFormat &other) noexcept - { qSwap(d, other.d); } + { + qSwap(fmt, other.fmt); + qSwap(audio, other.audio); + qSwap(video, other.video); + qSwap(d, other.d); + } FileFormat fileFormat() const { return fmt; } void setFileFormat(FileFormat f) { fmt = f; } |