Browse Source

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.5
Michael Niedermayer 11 years ago
parent
commit
765abb3b76
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/libvpxenc.c

+ 2
- 2
libavcodec/libvpxenc.c View File

@@ -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;


Loading…
Cancel
Save