summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMike William <mike@mikebwilliams.com>2011-05-21 04:50:59 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-05-21 04:50:59 +0200
commit840238b8706ea2ca740cf4b49bffd8ae196352f9 (patch)
tree7a3c65d1a04d379c25884455955463abf0fbd287 /ffmpeg.c
parentab1c19efc59cbcb1ff1b0c076cde01b87837f21e (diff)
ffserver: dont just crash
With changes from ubitux.
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 38297cc7f4..4d519c7ac9 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -713,6 +713,8 @@ static int read_ffserver_streams(AVFormatContext *s, const char *filename)
// FIXME: a more elegant solution is needed
st = av_mallocz(sizeof(AVStream));
memcpy(st, ic->streams[i], sizeof(AVStream));
+ st->info = av_malloc(sizeof(*st->info));
+ memcpy(st->info, ic->streams[i]->info, sizeof(*st->info));
st->codec = avcodec_alloc_context();
if (!st->codec) {
print_error(filename, AVERROR(ENOMEM));