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

add transcoding params to config

This commit is contained in:
winlin 2013-11-30 16:23:01 +08:00
parent 57064237d0
commit a086e2bbfa
3 changed files with 132 additions and 2 deletions

View file

@ -58,7 +58,7 @@ bool is_common_space(char ch)
return (ch == ' ' || ch == '\t' || ch == CR || ch == LF);
}
#define CONF_BUFFER_SIZE 4096
#define CONF_BUFFER_SIZE 1024 * 1024
SrsFileBuffer::SrsFileBuffer()
{
@ -369,6 +369,12 @@ int SrsConfDirective::refill_buffer(SrsFileBuffer* buffer, bool d_quoted, bool s
}
int size = FILE_SIZE(buffer->fd) - FILE_OFFSET(buffer->fd);
if (size > CONF_BUFFER_SIZE) {
ret = ERROR_SYSTEM_CONFIG_TOO_LARGE;
srs_error("config file too large, max=%d, actual=%d, ret=%d",
CONF_BUFFER_SIZE, size, ret);
return ret;
}
if (size <= 0) {
return ERROR_SYSTEM_CONFIG_EOF;

View file

@ -84,6 +84,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define ERROR_SYSTEM_CONFIG_EOF 409
#define ERROR_SYSTEM_STREAM_BUSY 410
#define ERROR_SYSTEM_IP_INVALID 411
#define ERROR_SYSTEM_CONFIG_TOO_LARGE 412
// see librtmp.
// failed when open ssl create the dh