mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
fix ffserver's SIGSEGV
This commit is contained in:
parent
0eed5016a2
commit
ab1c19efc5
1
ffmpeg.c
1
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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user