1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Merge 2.0release

This commit is contained in:
winlin 2018-07-17 13:59:51 +08:00
commit e4742ddac7
4 changed files with 5 additions and 1 deletions

View file

@ -653,6 +653,7 @@ srs_error_t SrsServer::acquire_pid_file()
if (fcntl(fd, F_SETLK, &lock) == -1) {
if(errno == EACCES || errno == EAGAIN) {
::close(fd);
srs_error("srs is already running!");
return srs_error_new(ERROR_SYSTEM_PID_ALREADY_RUNNING, "srs is already running");
}

View file

@ -203,7 +203,7 @@ bool SrsFlvAudio::aac(char* data, int size)
// 1 = 11 kHz = 11025 Hz
// 2 = 22 kHz = 22050 Hz
// 3 = 44 kHz = 44100 Hz
int srs_flv_srates[] = {5512, 11025, 22050, 44100};
int srs_flv_srates[] = {5512, 11025, 22050, 44100, 0};
// the sample rates in the codec,
// in the sequence header.

View file

@ -136,6 +136,7 @@ srs_error_t srs_socket_connect(string server, int port, int64_t tm, srs_netfd_t*
srs_assert(!stfd);
stfd = st_netfd_open_socket(sock);
if(stfd == NULL){
::close(sock);
return srs_error_new(ERROR_ST_OPEN_SOCKET, "open socket");
}