SuRGeoNix / Flyleaf

Media Player .NET Library for WinUI 3/ WPF/WinForms (based on FFmpeg/DirectX)
GNU Lesser General Public License v3.0
687 stars 92 forks source link

current subtitle disappear when resuming from pause #468

Closed umlx5h closed 1 month ago

umlx5h commented 1 month ago

Hello. Thank you for the great library.

I found a behavior that I am curious about and I would like to report it.

How to reproduce

  1. Open video with subtitles
  2. Press space to pause the video when the subtitle are displayed
  3. Press space again, the subtitle will disappear

Expected Behaivor

Subtitles should not disappear when playback resumed.

Investigation of cause

It seems to be due to the fact that subsText is removed in the following code. I assume they are put to turn off the subtitle when one seeks. I thought it might be better not to remove it when resuming playback.

https://github.com/SuRGeoNix/Flyleaf/blob/76add5053a385af5df86dc9824d39bb0e823b7f6/FlyleafLib/MediaPlayer/Player.Screamers.cs#L82-L85

umlx5h commented 1 month ago

Thanks! I've confirmed that the problem has been resolved.