diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2007-01-08 14:22:00 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2007-01-08 14:22:00 +0000 |
commit | 8fae2df5e847e2998e4bfe6d91b35c6768991b84 (patch) | |
tree | ec18044834e8eaf6c6512462fe4f95b35cf58e88 /libavformat/utils.c | |
parent | c6efa4b5b0395d00c61d57bffe73a5a4d7ff848e (diff) | |
download | ffmpeg-8fae2df5e847e2998e4bfe6d91b35c6768991b84.tar.gz |
10l, only allocate priv_data if not already done
Originally committed as revision 7428 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index a4c8b6f77f..ab64bfc22b 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2184,12 +2184,11 @@ int av_write_header(AVFormatContext *s) } } - if (s->oformat->priv_data_size > 0) { + if (!s->priv_data && s->oformat->priv_data_size > 0) { s->priv_data = av_mallocz(s->oformat->priv_data_size); if (!s->priv_data) return AVERROR_NOMEM; - } else - s->priv_data = NULL; + } if(s->oformat->write_header){ ret = s->oformat->write_header(s); |