diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-19 03:03:04 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-19 03:04:04 +0200 |
commit | 765abb3b76a1a9cb8f6896c30002551fa3bca8fd (patch) | |
tree | 7131891c7aafbeffd1f707a8a758efd813466f1d /libavcodec/libvpxenc.c | |
parent | c5e295cb9d57489741f66cbd6b058f0307652b6e (diff) | |
download | ffmpeg-765abb3b76a1a9cb8f6896c30002551fa3bca8fd.tar.gz |
avcodec/libvpxenc: use av_freep(), do not leave stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/libvpxenc.c')
-rw-r--r-- | libavcodec/libvpxenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index a745acd437..30940a128d 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -763,8 +763,8 @@ static int vp8_encode(AVCodecContext *avctx, AVPacket *pkt, } if (rawimg_alpha) { - av_free(rawimg_alpha->planes[VPX_PLANE_U]); - av_free(rawimg_alpha->planes[VPX_PLANE_V]); + av_freep(&rawimg_alpha->planes[VPX_PLANE_U]); + av_freep(&rawimg_alpha->planes[VPX_PLANE_V]); } *got_packet = !!coded_size; |