diff options
author | Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> | 2015-07-26 23:11:37 -0300 |
---|---|---|
committer | Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> | 2015-07-26 23:11:37 -0300 |
commit | c75bc268a2894d26e793d0c12e84d4ec6cc24860 (patch) | |
tree | 0e8617538cd1ad4ad223d134ffca5e5f1dd8dbea | |
parent | 2ea642ff4b730fcfc70cf6dc0c959762b8c9d799 (diff) | |
download | ffmpeg-c75bc268a2894d26e793d0c12e84d4ec6cc24860.tar.gz |
ffserver: simplify assignment with ternary
Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
-rw-r--r-- | ffserver.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/ffserver.c b/ffserver.c index 551ef88569..b4e6093cc8 100644 --- a/ffserver.c +++ b/ffserver.c @@ -703,13 +703,9 @@ static void start_wait_request(HTTPContext *c, int is_rtsp) c->buffer_ptr = c->buffer; c->buffer_end = c->buffer + c->buffer_size - 1; /* leave room for '\0' */ - if (is_rtsp) { - c->timeout = cur_time + RTSP_REQUEST_TIMEOUT; - c->state = RTSPSTATE_WAIT_REQUEST; - } else { - c->timeout = cur_time + HTTP_REQUEST_TIMEOUT; - c->state = HTTPSTATE_WAIT_REQUEST; - } + c->state = is_rtsp ? RTSPSTATE_WAIT_REQUEST : HTTPSTATE_WAIT_REQUEST; + c->timeout = cur_time + + is_rtsp ? RTSP_REQUEST_TIMEOUT : HTTP_REQUEST_TIMEOUT; } static void http_send_too_busy_reply(int fd) |