dji-sdk / Mobile-SDK-Android

DJI Mobile SDK for Android: http://developer.dji.com/mobile-sdk/
Other
973 stars 580 forks source link

Wrong code when RTMP server rejects the LiveStream #1163

Open asegs opened 1 year ago

asegs commented 1 year ago

I just ran into a nasty (but somewhat mundane) bug. I have this following config for my NGINX RTMP server:

rtmp {
        server {
                listen 1935;
                chunk_size 4096;
                allow publish 127.0.0.1;
                deny publish all;

                application live {
                        live on;
                        record off;
                }
        }
}

This means that all publishes except for the localhost are denied. When from another network (my home WiFi, but not the same machine) I tried to stream to the computer, I got a status 0, meaning the stream was working. However, it was actually denied. Once I added in an allow for the proper IP, I was fine, but this should not have been a code 0.

DJI-William commented 1 year ago

Looks like our source code lacks some checking. The streaming is broken but our source code thinks it is working.

asegs commented 1 year ago

Yes precisely. The actual source isn't available anywhere is it? Just the binaries?

DJI-William commented 1 year ago

Would you tried with the official app so that we know if this issue comes from the so library. Our RTMP function comes from a library.

asegs commented 1 year ago

I tried this with the sample application provided in this SDK.

DJI-William commented 1 year ago

How about the official app, DJI Pilot/DJI FLY/DJI GO 4?