fix: dangling OpenGL context crash and uninitialized audio frame size
- OpenGLRenderer: hold the viewer-owned QOpenGLContext in a QPointer so DestroyInternal() safely skips it when the context has already been destroyed by Qt's shared-context lifecycle. Fixes a SIGSEGV when the full gtest suite ran MainWindow.ConstructsOffscreenWithPanelsAndMenus after earlier viewer tests. - PreviewAudioDevice: add SetParams() deriving bytes_per_frame from the audio format (bytes per sample * channel count) instead of staying 0.
This commit is contained in:
@@ -42,6 +42,11 @@ bool PreviewAudioDevice::isSequential() const
|
||||
return true;
|
||||
}
|
||||
|
||||
void PreviewAudioDevice::SetParams(const core::AudioParams ¶ms)
|
||||
{
|
||||
set_bytes_per_frame(params.samples_to_bytes(1));
|
||||
}
|
||||
|
||||
qint64 PreviewAudioDevice::readData(char *data, qint64 maxSize)
|
||||
{
|
||||
QMutexLocker locker(&lock_);
|
||||
|
||||
Reference in New Issue
Block a user