diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-07-17 16:30:34 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-17 18:00:25 +0200 |
commit | f46e87602700cfec7af62c36a0c6272a3a802106 (patch) | |
tree | 77336789dfaf08f0cf379f4b993aac432f025133 | |
parent | 526bd7bdfad7d0e7b18ee45592e68c881abeac2a (diff) | |
download | ffmpeg-f46e87602700cfec7af62c36a0c6272a3a802106.tar.gz |
ffserver: use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | ffserver.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ffserver.c b/ffserver.c index 08f7878541..00153b44ae 100644 --- a/ffserver.c +++ b/ffserver.c @@ -646,7 +646,7 @@ static int http_server(void) struct pollfd *poll_table, *poll_entry; HTTPContext *c, *c_next; - if(!(poll_table = av_mallocz((nb_max_http_connections + 2)*sizeof(*poll_table)))) { + if(!(poll_table = av_mallocz_array(nb_max_http_connections + 2, sizeof(*poll_table)))) { http_log("Impossible to allocate a poll table handling %d connections.\n", nb_max_http_connections); return -1; } @@ -2297,7 +2297,7 @@ static int http_prepare_data(HTTPContext *c) c->fmt_ctx = *ctx; av_freep(&ctx); av_dict_copy(&(c->fmt_ctx.metadata), c->stream->metadata, 0); - c->fmt_ctx.streams = av_mallocz(sizeof(AVStream *) * c->stream->nb_streams); + c->fmt_ctx.streams = av_mallocz_array(c->stream->nb_streams, sizeof(AVStream *)); for(i=0;i<c->stream->nb_streams;i++) { AVStream *src; @@ -3425,7 +3425,7 @@ static int rtp_new_av_stream(HTTPContext *c, if (!st) goto fail; ctx->nb_streams = 1; - ctx->streams = av_mallocz(sizeof(AVStream *) * ctx->nb_streams); + ctx->streams = av_mallocz_array(ctx->nb_streams, sizeof(AVStream *)); if (!ctx->streams) goto fail; ctx->streams[0] = st; |