[FFmpeg-cvslog] avcodec/libvpxenc: use av_freep(), do not leave stale pointers in memory
Michael Niedermayer
git at videolan.org
Sun Oct 19 04:17:48 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Oct 19 03:03:04 2014 +0200| [765abb3b76a1a9cb8f6896c30002551fa3bca8fd] | committer: Michael Niedermayer
avcodec/libvpxenc: use av_freep(), do not leave stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=765abb3b76a1a9cb8f6896c30002551fa3bca8fd
---
libavcodec/libvpxenc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index a745acd..30940a1 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;
More information about the ffmpeg-cvslog
mailing list