You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @return Capture status reported to the streaming pipeline.
1062
1073
*/
1063
1074
intdummy_img(platf::img_t *img) override {
1064
-
// Empty images are recognized as dummies by the zero sequence number
1075
+
// Software encoders convert the dummy image immediately; provide a valid
1076
+
// (black) buffer instead of leaving img->data null, which makes sws fail
1077
+
// with EINVAL. The buffer is new[]-allocated and marked as owned so the
1078
+
// destructor releases it.
1079
+
if (img->data == nullptr) {
1080
+
constauto w = img->width;
1081
+
constauto h = img->height;
1082
+
if (w > 0 && h > 0) {
1083
+
img->data = newuint8_t[static_cast<size_t>(w) * h * 4](); // NOSONAR(cpp:S5025) - buffer is owned by the image and freed by img_descriptor_t's destructor
0 commit comments