Browse Source

10l, only allocate priv_data if not already done

Originally committed as revision 7428 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Baptiste Coudurier 19 years ago
parent
commit
8fae2df5e8
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      libavformat/utils.c

+ 2
- 3
libavformat/utils.c View File

@@ -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);


Loading…
Cancel
Save