Commit 765abb3b authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/libvpxenc: use av_freep(), do not leave stale pointers in memory

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c5e295cb
...@@ -763,8 +763,8 @@ static int vp8_encode(AVCodecContext *avctx, AVPacket *pkt, ...@@ -763,8 +763,8 @@ static int vp8_encode(AVCodecContext *avctx, AVPacket *pkt,
} }
if (rawimg_alpha) { if (rawimg_alpha) {
av_free(rawimg_alpha->planes[VPX_PLANE_U]); av_freep(&rawimg_alpha->planes[VPX_PLANE_U]);
av_free(rawimg_alpha->planes[VPX_PLANE_V]); av_freep(&rawimg_alpha->planes[VPX_PLANE_V]);
} }
*got_packet = !!coded_size; *got_packet = !!coded_size;
......
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