diff options
author | Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> | 2015-12-14 09:49:08 -0800 |
---|---|---|
committer | Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> | 2015-12-15 10:04:49 -0800 |
commit | 5a31f2318b8fed1f4711cb86eab6d9b679946878 (patch) | |
tree | 9820a83c2a7f204492ba71044b003f787e380a7c /ffserver.c | |
parent | 4469e8ebb2f370794c88aa51d528d1d899d29ddc (diff) | |
download | ffmpeg-5a31f2318b8fed1f4711cb86eab6d9b679946878.tar.gz |
ffserver: allocate AVStream's internal too
Avoids segfault at init_muxer() (mux.c) due to a
null pointer dereference on the recently
introduced AVStream->internal
Fixes: #5059 (https://trac.ffmpeg.org/ticket/5059)
Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Diffstat (limited to 'ffserver.c')
-rw-r--r-- | ffserver.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ffserver.c b/ffserver.c index 029771c20a..4392a62bba 100644 --- a/ffserver.c +++ b/ffserver.c @@ -3423,6 +3423,7 @@ static int rtp_new_av_stream(HTTPContext *c, /********************************************************************/ /* ffserver initialization */ +/* FIXME: This code should use avformat_new_stream() */ static AVStream *add_av_stream1(FFServerStream *stream, AVCodecContext *codec, int copy) { @@ -3448,6 +3449,7 @@ static AVStream *add_av_stream1(FFServerStream *stream, fst->codec = codec; fst->priv_data = av_mallocz(sizeof(FeedData)); + fst->internal = av_mallocz(sizeof(*fst->internal)); fst->index = stream->nb_streams; avpriv_set_pts_info(fst, 33, 1, 90000); fst->sample_aspect_ratio = codec->sample_aspect_ratio; |