[FFmpeg-devel] [PATCH 13/22] lavfhttpd.c: simplify av_malloc() for client_http

Stephan Holljes klaxa1337 at googlemail.com
Fri Jun 1 01:24:06 EEST 2018


Signed-off-by: Stephan Holljes <klaxa1337 at googlemail.com>
---
 lavfhttpd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lavfhttpd.c b/lavfhttpd.c
index d094d65..b1e8819 100644
--- a/lavfhttpd.c
+++ b/lavfhttpd.c
@@ -76,7 +76,7 @@ int lavfhttpd_accept(void *server, struct HTTPClient **client, int reply_code)
     }
     client_ctx->seekable = 0;
     ret2 = HTTPD_OK;
-    client_http = av_malloc(sizeof(struct HTTPClient));
+    client_http = av_malloc(sizeof(*client_http));
     if (!client_http) {
         av_log(server, AV_LOG_ERROR, "Could not allocate http client.\n");
         return HTTPD_OTHER_ERROR;
-- 
2.16.2



More information about the ffmpeg-devel mailing list