From 282a06b7770b9ca4cfaf6b9077d72c79c4f63826 Mon Sep 17 00:00:00 2001 From: Mike Solar Date: Sun, 12 Jul 2026 19:37:01 +0800 Subject: [PATCH] Default to full-resolution preview and fix audio-waveform freeze - Use a divider of 1 (full resolution) for new sequences and for footage-derived viewer parameters instead of the auto-downscaling heuristic, so the viewer defaults to full-res preview. - In AudioWaveformView, base the view timebase on the video frame rate when video is present; fall back to the audio sample rate only for audio-only sources. Using the audio sample rate as the view timebase created an enormous scene rect (time * sample_rate * scale), which froze the waveform view and stalled playback updates when showing the audio waveform. --- app/node/output/viewer/viewer.cpp | 5 ++--- app/widget/viewer/audiowaveformview.cpp | 6 +++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/node/output/viewer/viewer.cpp b/app/node/output/viewer/viewer.cpp index 84627570f..c66525a45 100644 --- a/app/node/output/viewer/viewer.cpp +++ b/app/node/output/viewer/viewer.cpp @@ -235,7 +235,7 @@ void ViewerOutput::set_default_parameters() OLIVE_CONFIG("DefaultSequencePixelAspect").value(), OLIVE_CONFIG("DefaultSequenceInterlacing") .value(), - VideoParams::generate_auto_divider(width, height))); + 1)); AVChannelLayout layout; av_channel_layout_from_mask( &layout, OLIVE_CONFIG("DefaultSequenceAudioLayout").toULongLong()); @@ -586,8 +586,7 @@ void ViewerOutput::set_parameters_from_footage( static_cast( OLIVE_CONFIG("OfflinePixelFormat").toInt()), VideoParams::kInternalChannelCount, s.pixel_aspect_ratio(), - s.interlacing(), - VideoParams::generate_auto_divider(s.width(), s.height()))); + s.interlacing(), 1)); if (found_video_params) { break; diff --git a/app/widget/viewer/audiowaveformview.cpp b/app/widget/viewer/audiowaveformview.cpp index cac2a5713..5b9331c70 100644 --- a/app/widget/viewer/audiowaveformview.cpp +++ b/app/widget/viewer/audiowaveformview.cpp @@ -67,7 +67,11 @@ void AudioWaveformView::SetViewer(ViewerOutput *playback) connect(playback_, &ViewerOutput::ConnectedWaveformChanged, viewport(), static_cast(&QWidget::update)); - SetTimebase(playback_->GetAudioParams().sample_rate_as_time_base()); + SetTimebase(playback_->GetVideoParams().frame_rate_as_time_base()); + if (timebase().isNull()) { + SetTimebase( + playback_->GetAudioParams().sample_rate_as_time_base()); + } } }