diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-06-17 11:55:11 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-06-17 15:43:24 +0200 |
commit | acc8628c3b4725170a1d6444f4c24118be49779d (patch) | |
tree | 6a5b49ccc324306c1f0a196606ceeff722b22a00 /src | |
parent | 83a031c56b74d68fe6d349f78c48a1681e40374e (diff) |
Fix qSwap(QMediaFormat, QMediaFormat)
You need to swap all members.
Fixes: QTBUG-94565
Pick-to: 6.2
Change-Id: I0decfb3ea033bc358c39618a36d77ca9e0972e84
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src')
-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; } |