YUV420pFrame::BufferRGBA: fix uninitialized width/height

- This fixes a video recording crash that manifested
  randomly, but more often when repeatedly quickly
  starting and stopping a recording
- The first video frame had uninitialized memory that left
  it up to chance whether an internal buffer was correctly
  sized (SIGSEGV)
This commit is contained in:
James R 2024-03-26 02:15:07 -07:00
parent f442f933fc
commit df7b13499f

View file

@ -1,6 +1,6 @@
// RING RACERS
//-----------------------------------------------------------------------------
// Copyright (C) 2023 by James Robert Roman
// Copyright (C) 2023-2024 by James Robert Roman
//
// This program is free software distributed under the
// terms of the GNU General Public License, version 2.
@ -36,7 +36,8 @@ public:
int height() const { return height_; }
private:
int width_, height_;
int width_ = 0;
int height_ = 0;
std::vector<uint8_t> vec_;
};