Skip to content

Commit

Permalink
Fix Encoder Speed stuck when switching between encoders (frontend only)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alkl58 committed Jan 30, 2024
1 parent 4161cb0 commit 18480bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ public VideoTabOptimization()
}

private void SliderEncoderPreset_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
UpdateSpeedLabel();
}

public void UpdateSpeedLabel()
{
if (MainWindow.startupLock) return;

Expand Down Expand Up @@ -39,6 +44,8 @@ private void SliderEncoderPreset_ValueChanged(object sender, RoutedPropertyChang
}
}

LabelSpeedValue.Content = SliderEncoderPreset.Value;

// x264 / x265
if (mainWindow.VideoTabVideoPartialControl.ComboBoxVideoEncoder.SelectedIndex is (int)Video.Encoders.X265 or (int)Video.Encoders.X264)
{
Expand Down
2 changes: 2 additions & 0 deletions NotEnoughAV1Encodes/Controls/Partials/VideoTabVideo.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ private void ComboBoxVideoEncoder_SelectionChanged(object sender, SelectionChang
(int)Video.Encoders.AMFAV1 => "AMF (AV1)",
_ => ""
};

mainWindow.VideoTabVideoOptimizationControl.UpdateSpeedLabel();
}
}
}

0 comments on commit 18480bf

Please sign in to comment.