changeset 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 08723d0e5266
children 0eb476c1730d
files libxvidff.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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);