[FFmpeg-cvslog] fix ffserver's SIGSEGV
Maksym Veremeyenko
git at videolan.org
Sat May 21 04:57:01 CEST 2011
ffmpeg | branch: master | Maksym Veremeyenko <verem at m1stereo.tv> | Sat May 21 04:39:20 2011 +0200| [ab1c19efc59cbcb1ff1b0c076cde01b87837f21e] | committer: Michael Niedermayer
fix ffserver's SIGSEGV
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ab1c19efc59cbcb1ff1b0c076cde01b87837f21e
---
ffmpeg.c | 1 +
ffserver.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index fb644ad..38297cc 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -703,6 +703,7 @@ static int read_ffserver_streams(AVFormatContext *s, const char *filename)
return err;
/* copy stream format */
s->nb_streams = 0;
+ s->streams = av_mallocz(sizeof(*s->streams) * ic->nb_streams);
for(i=0;i<ic->nb_streams;i++) {
AVStream *st;
AVCodec *codec;
diff --git a/ffserver.c b/ffserver.c
index 81c9fcf..517cb6f 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -2229,6 +2229,7 @@ static int http_prepare_data(HTTPContext *c)
av_metadata_set2(&c->fmt_ctx.metadata, "copyright", c->stream->copyright, 0);
av_metadata_set2(&c->fmt_ctx.metadata, "title" , c->stream->title , 0);
+ c->fmt_ctx.streams = av_mallocz(sizeof(*c->fmt_ctx.streams) * c->stream->nb_streams);
for(i=0;i<c->stream->nb_streams;i++) {
AVStream *st;
AVStream *src;
More information about the ffmpeg-cvslog
mailing list