RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
235 stars 28 forks source link

Stackoverflow when call MediaPlayer Stop #1922

Closed cowbear6598 closed 3 months ago

cowbear6598 commented 3 months ago

Describe the issue I just call media player's stop function, and it appear this error.

Your Setup (please complete the following information):

To Reproduce

  1. use demo media reference
  2. call play and stop

Logs StackOverflowException: The requested operation caused a stack overflow. RenderHeads.Media.AVProVideo.WindowsMediaPlayer.Stop () (at Assets/AVProVideo/Runtime/Scripts/Internal/Players/WindowsMediaPlayer.cs:583) RenderHeads.Media.AVProVideo.WindowsMediaPlayer.Stop () (at Assets/AVProVideo/Runtime/Scripts/Internal/Players/WindowsMediaPlayer.cs:583) RenderHeads.Media.AVProVideo.WindowsMediaPlayer.Stop () (at Assets/AVProVideo/Runtime/Scripts/Internal/Players/WindowsMediaPlayer.cs:583) RenderHeads.Media.AVProVideo.WindowsMediaPlayer.Stop () (at Assets/AVProVideo/Runtime/Scripts/Internal/Players/WindowsMediaPlayer.cs:583) RenderHeads.Media.AVProVideo.WindowsMediaPlayer.Stop () (at Assets/AVProVideo/Runtime/Scripts/Internal/Players/WindowsMediaPlayer.cs:583) RenderHeads.Media.AVProVideo.WindowsMediaPlayer.Stop () (at Assets/AVProVideo/Runtime/Scripts/Internal/Players/WindowsMediaPlayer.cs:583) RenderHeads.Media.AVProVideo.WindowsMediaPlayer.Stop () (at Assets/AVProVideo/Runtime/Scripts/Internal/Players/WindowsMediaPlayer.cs:583) ...

Screenshots image image

cowbear6598 commented 3 months ago

I also test 3.0.4 trial version and 3.0.5 trial version, 3.0.4 is find no error, 3.0.5 trial verison has error too.

RichRH commented 3 months ago

Hi @cowbear6598,

Thanks for reporting this - looks like a typo has snuck in. Fixed for the next release but in the meantime change 'WindowsMediaPlayer.cs' line 583 from 'Stop()' to 'Pause()' to work around this.

Cheers,

Chris-RH commented 2 months ago

AVPro Video version 3.0.6 has been released. Please let us know if it has not fixed your issue.