Commit b88adaf
[decode][mediasdk] Fix Coverity issues in decode and test components (CIDs 3568170, 3584109, 3301792, 3388910, 3403404, 3403405)
- CID 3568170 (RULE_OF_ZERO_THREE_FIVE): Add delete move constructor and move
assignment operator to DecVppSfc to satisfy Rule of Five. Class already
explicitly defines copy ctor, copy assign, and destructor.
- CID 3584109 (MISSING_LOCK): Add std::lock_guard<std::mutex> guard(m_mGuard)
in GetDecodeStat before accessing decoder->m_stat to protect against
concurrent modification.
- CID 3301792 (COPY_INSTEAD_OF_MOVE): Use std::move(dpb) at last use in
PackAU to avoid an unnecessary copy of the DPB list when passing to
PackSliceParam (dpb is not used after this call).
- CIDs 3388910, 3403404, 3403405 (COPY_INSTEAD_OF_MOVE): Use std::move in
Field constructor and STRUCT macro to avoid redundant copies when
constructing tsStruct Field objects from std::string _name parameter.
False positives (no fix needed):
- CID 3584110 (MISSING_LOCK): Decode routine is intentionally called
concurrently by scheduler threads; adding a lock would break parallelism.
- CIDs 3390335, 3390336 (SLEEP): Same pattern as H265/H264 decoders;
SurfaceSource::Reset/Close under m_guard is by design.
- CID 3583235 (INTEGER_OVERFLOW): size >= 1 is guaranteed by loop break at
line 168, so size -= 1 cannot underflow.
Coverity: CIDs 3568170, 3584109, 3301792, 3388910, 3403404, 34034051 parent 3e7441f commit b88adaf
1 file changed
Lines changed: 1 addition & 1 deletion
File tree
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
953 | 953 | | |
954 | 954 | | |
955 | 955 | | |
956 | | - | |
| 956 | + | |
957 | 957 | | |
958 | 958 | | |
959 | 959 | | |
| |||
0 commit comments