diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2011-04-27 08:29:02 -0700 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-05-03 22:29:08 -0400 |
commit | 25588d3b8a556eb5d0d3239d8c6aee968ea18896 (patch) | |
tree | d0df42d940968da09408b7a78f4f90f3a341bb4a | |
parent | fb22c237152ea62f51b8e1c96a782bae4c8709c1 (diff) | |
download | ffmpeg-25588d3b8a556eb5d0d3239d8c6aee968ea18896.tar.gz |
nutenc: don't av_malloc(0).
-rw-r--r-- | libavformat/nutenc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index df5dc6fdf7..4ca761ab40 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -584,7 +584,8 @@ static int write_header(AVFormatContext *s){ nut->avf= s; nut->stream = av_mallocz(sizeof(StreamContext)*s->nb_streams); - nut->chapter = av_mallocz(sizeof(ChapterContext)*s->nb_chapters); + if (s->nb_chapters) + nut->chapter = av_mallocz(sizeof(ChapterContext)*s->nb_chapters); nut->time_base= av_mallocz(sizeof(AVRational )*(s->nb_streams + s->nb_chapters)); |