mirror of https://git.ffmpeg.org/ffmpeg.git
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
This commit is contained in:
parent
601ca8c55c
commit
e644db613a
|
@ -481,7 +481,7 @@ static av_cold int xvid_encode_close(AVCodecContext *avctx) {
|
||||||
xvid_encore(x->encoder_handle, XVID_ENC_DESTROY, NULL, NULL);
|
xvid_encore(x->encoder_handle, XVID_ENC_DESTROY, NULL, NULL);
|
||||||
|
|
||||||
if( avctx->extradata != NULL )
|
if( avctx->extradata != NULL )
|
||||||
av_free(avctx->extradata);
|
av_freep(&avctx->extradata);
|
||||||
if( x->twopassbuffer != NULL ) {
|
if( x->twopassbuffer != NULL ) {
|
||||||
av_free(x->twopassbuffer);
|
av_free(x->twopassbuffer);
|
||||||
av_free(x->old_twopassbuffer);
|
av_free(x->old_twopassbuffer);
|
||||||
|
|
Loading…
Reference in New Issue