summaryrefslogtreecommitdiff
path: root/ffserver.c
diff options
context:
space:
mode:
Diffstat (limited to 'ffserver.c')
-rw-r--r--ffserver.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/ffserver.c b/ffserver.c
index e003a9e0ad..9461e92c07 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -2457,9 +2457,12 @@ static int http_receive_data(HTTPContext *c)
if (!fmt_in)
goto fail;
- s.priv_data = av_mallocz(fmt_in->priv_data_size);
- if (!s.priv_data)
- goto fail;
+ if (fmt_in->priv_data_size > 0) {
+ s.priv_data = av_mallocz(fmt_in->priv_data_size);
+ if (!s.priv_data)
+ goto fail;
+ } else
+ s.priv_data = NULL;
if (fmt_in->read_header(&s, 0) < 0) {
av_freep(&s.priv_data);