diff libxvidff.c @ 11543:965eca23972e libavcodec

libxvid: Clear extradata pointer when freeing it. Fixes crash when avcodec_close() tried freeing it again. Fixes issue 1846.
author ramiro
date Fri, 26 Mar 2010 04:12:28 +0000
parents 67786aecf351
children 8a4984c5cacc
line wrap: on
line diff
--- a/libxvidff.c	Fri Mar 26 03:31:56 2010 +0000
+++ b/libxvidff.c	Fri Mar 26 04:12:28 2010 +0000
@@ -481,7 +481,7 @@
     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);