X-Git-Url: http://git.videolan.org/?p=ffmpeg.git;a=blobdiff_plain;f=libavformat%2Friff.c;h=fe6cc5505517588c17fa5c2fcafb6eb054da7a1c;hp=e17980a00a22bd9ecadd15b98176c03a905f6bec;hb=ed8a50068caacf722b6c7a81f77abcadc134e544;hpb=dbd3183935e252aaf5796638d4711cff27c75934 diff --git a/libavformat/riff.c b/libavformat/riff.c index e17980a00a..fe6cc55055 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -509,6 +509,7 @@ int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size) } codec->extradata_size = cbSize; if (cbSize > 0) { + av_free(codec->extradata); codec->extradata = av_mallocz(codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); if (!codec->extradata) return AVERROR(ENOMEM);