mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Update cap_mjpeg_encoder.cpp
Avoid shifting by 32bits; undefined behavior according to c - standard
This commit is contained in:
committed by
GitHub
parent
06b0fe35d2
commit
0e64e68d31
@@ -384,7 +384,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
data[m_pos] |= (tempval << bits_free);
|
||||
data[m_pos] |= (bits_free == 32) ? tempval : (tempval << bits_free);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user