another potential fix

This commit is contained in:
Saxon1 2018-05-03 15:26:09 +09:30
parent 51ade541c9
commit 567d52aacc
1 changed files with 2 additions and 0 deletions

View File

@ -41,6 +41,7 @@ unsigned int RTMP_start_session(char* url, uint connect_timeout){
rtmp->Link.timeout = connect_timeout;
if (!RTMP_SetupURL(rtmp, url)) {
printf("Can't setup url!\n");
RTMP_Close(rtmp);
RTMP_Free(rtmp);
return 0;
}
@ -49,6 +50,7 @@ unsigned int RTMP_start_session(char* url, uint connect_timeout){
RTMP_SetBufferMS(rtmp, 3600 * 1000);
if (!RTMP_Connect(rtmp, NULL)) {
printf("RTMP can't connect!\n");
RTMP_Close(rtmp);
RTMP_Free(rtmp);
return 0;
}