[FFmpeg-cvslog] ffserver: check return code of avio_alloc_context()

Michael Niedermayer git at videolan.org
Tue Jun 2 15:06:21 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jun  2 14:45:08 2015 +0200| [cea3c9b281246f5ff5d27b1a02e3434b3ee178a6] | committer: Michael Niedermayer

ffserver: check return code of avio_alloc_context()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cea3c9b281246f5ff5d27b1a02e3434b3ee178a6
---

 ffserver.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/ffserver.c b/ffserver.c
index 4803b96..06218e0 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -2649,6 +2649,9 @@ static int http_receive_data(HTTPContext *c)
 
             pb = avio_alloc_context(c->buffer, c->buffer_end - c->buffer,
                                     0, NULL, NULL, NULL, NULL);
+            if (!pb)
+                goto fail;
+
             pb->seekable = 0;
 
             s->pb = pb;



More information about the ffmpeg-cvslog mailing list