diff options
author | Ramiro Polla <ramiro.polla@gmail.com> | 2010-03-26 07:12:28 +0300 |
---|---|---|
committer | Ramiro Polla <ramiro.polla@gmail.com> | 2010-03-26 07:12:28 +0300 |
commit | e644db613a8fe008c996ca642800f8ccd90e613f (patch) | |
tree | a0b85471f7bc1107f28892dd1c3798cbeccd335f /libavcodec/libxvidff.c | |
parent | 601ca8c55c5619883d0cfe1cdd04022aeab16351 (diff) |
libxvid: Clear extradata pointer when freeing it.
Fixes crash when avcodec_close() tried freeing it again.
Fixes issue 1846.
Originally committed as revision 22691 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/libxvidff.c')
-rw-r--r-- | libavcodec/libxvidff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/libxvidff.c b/libavcodec/libxvidff.c index 661b23bc61..855aba1ec5 100644 --- a/libavcodec/libxvidff.c +++ b/libavcodec/libxvidff.c @@ -481,7 +481,7 @@ static av_cold int xvid_encode_close(AVCodecContext *avctx) { xvid_encore(x->encoder_handle, XVID_ENC_DESTROY, NULL, NULL); if( avctx->extradata != NULL ) - av_free(avctx->extradata); + av_freep(&avctx->extradata); if( x->twopassbuffer != NULL ) { av_free(x->twopassbuffer); av_free(x->old_twopassbuffer); |