Commit 94178464 authored by ramiro's avatar ramiro

libxvid: Clear extradata pointer when freeing it.

Fixes crash when avcodec_close() tried freeing it again.
Fixes issue 1846.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22691 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 22d087a3
...@@ -481,7 +481,7 @@ static av_cold int xvid_encode_close(AVCodecContext *avctx) { ...@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment