Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Little Freeze every 3 sec. #425

Closed
Nounours54 opened this issue Feb 5, 2019 · 9 comments
Closed

Little Freeze every 3 sec. #425

Nounours54 opened this issue Feb 5, 2019 · 9 comments

Comments

@Nounours54
Copy link

Hello,
first thank you for this great app !

My issue is that with the lastest version (1.5 and 1.6) I have some little freeze (only in the app, not on my smartphone). Every around 3 sec. there is a freeze.
So, I came back on the 1.3 version and it works fine.

Smartphone Honor 8 Pro (DUK-L09) with Android 8.0, and Windows 10 Pro.

Sorry for my english ^^

@rom1v
Copy link
Collaborator

rom1v commented Feb 5, 2019

My issue is that with the lastest version (1.5 and 1.6)
So, I came back on the 1.3 version and it works fine.

What about version 1.4? (this may help to find the issue)

What if you take 1.6 release, then replace all DLL files by those from 1.3?

Also display FPS in the console (Ctrl+i in the scrcpy window).

@rom1v rom1v added the display label Feb 5, 2019
@rom1v
Copy link
Collaborator

rom1v commented Feb 26, 2019

@Nounours54 ?

@Nounours54
Copy link
Author

Sorry, i don't come here very often.
I tried with the 1.8 release, there is the same problem.
So, I replaced all DLL files (1.3 --> 1.8) and it works very well.
Should I have to do this for every new version ?

@rom1v
Copy link
Collaborator

rom1v commented Mar 8, 2019

To know if the problem comes from from libav or SDL, could you replace only SDL2.dll or replace all av*.dll+swresample-3.dll separately, please?

@Nounours54
Copy link
Author

Ok.
I only replaced the SDL2.dll and it works.

@rom1v rom1v added the sdl label Mar 8, 2019
@rom1v
Copy link
Collaborator

rom1v commented Mar 8, 2019

OK, so this is due a change between SDL 2.0.8 and 2.0.9. So it should also work with SDL2.dll from scrcpy v1.4, right? (SDL 2.0.9 is in the Windows release since scrcpy v1.5)

@Nounours54
Copy link
Author

Yes it is

@rom1v
Copy link
Collaborator

rom1v commented Mar 13, 2019

It may be related to https://discourse.libsdl.org/t/unstable-frame-rate-unexpectedly/25783.

A workaround to make it work with SDL 2.0.9 could be:

diff --git a/app/src/scrcpy.c b/app/src/scrcpy.c
index 61b3f8d..3cdcedc 100644
--- a/app/src/scrcpy.c
+++ b/app/src/scrcpy.c
@@ -44,7 +44,9 @@ static struct input_manager input_manager = {
 // init SDL and set appropriate hints
 static bool
 sdl_init_and_configure(bool display) {
-    uint32_t flags = display ? SDL_INIT_VIDEO : SDL_INIT_EVENTS;
+    uint32_t flags = display
+                   ? SDL_INIT_VIDEO | SDL_INIT_JOYSTICK
+                   : SDL_INIT_EVENTS;
     if (SDL_Init(flags)) {
         LOGC("Could not initialize SDL: %s", SDL_GetError());
         return false;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@rom1v @Nounours54 and others