Commit 3b6c0ba3 authored by Michael Niedermayer's avatar Michael Niedermayer

oggenc: favor av_freep()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 17d51938
......@@ -516,11 +516,11 @@ static int ogg_write_trailer(AVFormatContext *s)
OGGStreamContext *oggstream = st->priv_data;
if (st->codec->codec_id == CODEC_ID_FLAC ||
st->codec->codec_id == CODEC_ID_SPEEX) {
av_free(oggstream->header[0]);
av_free(oggstream->header[1]);
av_freep(&oggstream->header[0]);
av_freep(&oggstream->header[1]);
}
else
av_free(oggstream->header[1]);
av_freep(&oggstream->header[1]);
av_freep(&st->priv_data);
}
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment