mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 11:51:57 +00:00
Fix bug
This commit is contained in:
parent
7dcfd6b029
commit
a2d9f0a9ad
9 changed files with 13 additions and 6 deletions
|
@ -3662,7 +3662,7 @@ srs_error_t SrsConfig::check_normal_config()
|
|||
for (int i = 0; i < (int)listens.size(); i++) {
|
||||
string port = listens[i];
|
||||
if (port.empty() || ::atoi(port.c_str()) <= 0) {
|
||||
return srs_error_new(ERROR_SYSTEM_CONFIG_INVALID, "listen.port=%d is invalid", port.c_str());
|
||||
return srs_error_new(ERROR_SYSTEM_CONFIG_INVALID, "listen.port=%s is invalid", port.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -307,6 +307,7 @@ SrsDashController::SrsDashController()
|
|||
vfragments = new SrsFragmentWindow();
|
||||
afragments = new SrsFragmentWindow();
|
||||
audio_dts = video_dts = 0;
|
||||
fragment = 0;
|
||||
}
|
||||
|
||||
SrsDashController::~SrsDashController()
|
||||
|
|
|
@ -585,6 +585,7 @@ string SrsDvrAsyncCallOnDvr::to_string()
|
|||
SrsDvrPlan::SrsDvrPlan()
|
||||
{
|
||||
req = NULL;
|
||||
hub = NULL;
|
||||
|
||||
dvr_enabled = false;
|
||||
segment = NULL;
|
||||
|
|
|
@ -134,7 +134,7 @@ srs_error_t SrsVodStream::serve_flv_stream(ISrsHttpResponseWriter* w, ISrsHttpMe
|
|||
|
||||
// send data
|
||||
if ((err = copy(w, fs, r, (int)left)) != srs_success) {
|
||||
return srs_error_wrap(err, "read flv=%s size=%d", fullpath.c_str(), left);
|
||||
return srs_error_wrap(err, "read flv=%s size=%d", fullpath.c_str(), (int)left);
|
||||
}
|
||||
|
||||
return err;
|
||||
|
@ -184,7 +184,7 @@ srs_error_t SrsVodStream::serve_mp4_stream(ISrsHttpResponseWriter* w, ISrsHttpMe
|
|||
|
||||
// send data
|
||||
if ((err = copy(w, fs, r, (int)left)) != srs_success) {
|
||||
return srs_error_wrap(err, "read mp4=%s size=%d", fullpath.c_str(), left);
|
||||
return srs_error_wrap(err, "read mp4=%s size=%d", fullpath.c_str(), (int)left);
|
||||
}
|
||||
|
||||
return err;
|
||||
|
|
|
@ -122,6 +122,9 @@ SrsRtmpConn::SrsRtmpConn(SrsServer* svr, srs_netfd_t c, string cip, int port) :
|
|||
tcp_nodelay = false;
|
||||
info = new SrsClientInfo();
|
||||
|
||||
publish_1stpkt_timeout = 0;
|
||||
publish_normal_timeout = 0;
|
||||
|
||||
_srs_config->subscribe(this);
|
||||
}
|
||||
|
||||
|
|
|
@ -5217,7 +5217,7 @@ srs_error_t SrsMp4BoxReader::read(SrsSimpleStream* stream, SrsMp4Box** ppbox)
|
|||
while (stream->length() < (int)required) {
|
||||
ssize_t nread;
|
||||
if ((err = rsio->read(buf, SRS_MP4_BUF_SIZE, &nread)) != srs_success) {
|
||||
return srs_error_wrap(err, "load failed, nread=%d, required=%d", nread, required);
|
||||
return srs_error_wrap(err, "load failed, nread=%d, required=%d", (int)nread, required);
|
||||
}
|
||||
|
||||
srs_assert(nread > 0);
|
||||
|
|
|
@ -147,6 +147,7 @@ private:
|
|||
skip = false;
|
||||
sent = false;
|
||||
dirty = false;
|
||||
duration = 0.0;
|
||||
}
|
||||
|
||||
int fetch(std::string m3u8);
|
||||
|
|
|
@ -457,7 +457,7 @@ srs_error_t SrsHttpFileServer::serve_file(ISrsHttpResponseWriter* w, ISrsHttpMes
|
|||
// write body.
|
||||
int64_t left = length;
|
||||
if ((err = copy(w, fs, r, (int)left)) != srs_success) {
|
||||
return srs_error_wrap(err, "copy file=%s size=%d", fullpath.c_str(), left);
|
||||
return srs_error_wrap(err, "copy file=%s size=%d", fullpath.c_str(), (int)left);
|
||||
}
|
||||
|
||||
if ((err = w->final_request()) != srs_success) {
|
||||
|
|
|
@ -139,7 +139,7 @@ srs_error_t SrsHttpParser::parse_message_imp(ISrsReader* reader)
|
|||
enum http_errno code;
|
||||
if ((code = HTTP_PARSER_ERRNO(&parser)) != HPE_OK) {
|
||||
return srs_error_new(ERROR_HTTP_PARSE_HEADER, "parse %dB, nparsed=%d, err=%d/%s %s",
|
||||
buffer->size(), consumed, code, http_errno_name(code), http_errno_description(code));
|
||||
buffer->size(), (int)consumed, code, http_errno_name(code), http_errno_description(code));
|
||||
}
|
||||
|
||||
// When buffer consumed these bytes, it's dropped so the new ptr is actually the HTTP body. But http-parser
|
||||
|
@ -940,6 +940,7 @@ SrsHttpResponseReader::SrsHttpResponseReader(SrsHttpMessage* msg, ISrsReader* re
|
|||
nb_total_read = 0;
|
||||
nb_left_chunk = 0;
|
||||
buffer = body;
|
||||
nb_chunk = 0;
|
||||
}
|
||||
|
||||
SrsHttpResponseReader::~SrsHttpResponseReader()
|
||||
|
|
Loading…
Reference in a new issue