huynhsontung / Screenbox

LibVLC-based media player for the Universal Windows Platform
GNU General Public License v3.0
1.11k stars 44 forks source link

Problem with selecting the playback speed #375

Closed vladkryv closed 6 months ago

vladkryv commented 6 months ago

Describe the bug Of the speeds offered, only 1x and 2x work, selecting other speeds does not change anything. At the same time everything works with “Custom value”.

How To Reproduce Steps to reproduce the behavior:

  1. Open any video (I checked mp4)
  2. Click on 'Playback speed'
  3. Select 0.25/0.5/0.75/1.25/1.5/1.75 (any)
  4. See that the playback speed does not change

Expected behavior Change the playback speed when choosing any option.

Environment

Additional context Reproduce in Ukrainian and Russian interface language, in English there is no problem.

The problem is in this location - https://github.com/huynhsontung/Screenbox/blob/3adb05eefb3cabc71b29cdf65f4853d21324b9e5/Screenbox.Core/ViewModels/PlayerControlsViewModel.cs#L293

To solve the problem you can replace this line with if (!double.TryParse(speedText, CultureInfo.InvariantCulture, out double speed))

In other places where the double.TryParse is used, I think you should also add this parameter.

huynhsontung commented 6 months ago

Thank you for reporting. This issue has now been resolved in 5d08a92