[FFmpeg-devel] [PATCH 03/22] ffserver.c: Fix indentation (replace tabs by spaces) and cosmetics
Stephan Holljes
klaxa1337 at googlemail.com
Fri Jun 1 01:23:56 EEST 2018
Signed-off-by: Stephan Holljes <klaxa1337 at googlemail.com>
---
ffserver.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/ffserver.c b/ffserver.c
index 9b28fdc..fe84b2e 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -152,7 +152,7 @@ void *read_thread(void *arg)
publisher_push_segment(info->pub, seg);
av_log(NULL, AV_LOG_DEBUG, "New segment pushed.\n");
publish(info->pub);
- av_log(NULL, AV_LOG_DEBUG, "Published new segment.\n");
+ av_log(NULL, AV_LOG_DEBUG, "Published new segment.\n");
}
segment_init(&seg, ifmt_ctx);
seg->id = id++;
@@ -337,8 +337,9 @@ void *accept_thread(void *arg)
ifmt_ctx = NULL;
for (i = 0; i < config->nb_streams; i++) {
stream_name = info->pubs[i]->stream_name;
- // skip leading '/' ---v
- if(!strncmp(client->resource + 1, stream_name, strlen(stream_name))) {
+ // skip leading '/' ---v
+ if (client->resource && strlen(client->resource)
+ && !strncmp(client->resource + 1, stream_name, strlen(stream_name))) {
pub = info->pubs[i];
ifmt_ctx = info->ifmt_ctxs[i];
break;
--
2.16.2
More information about the ffmpeg-devel
mailing list