Mercurial > libavcodec.hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
11542:08723d0e5266 | 11543:965eca23972e |
---|---|
479 struct xvid_context *x = avctx->priv_data; | 479 struct xvid_context *x = avctx->priv_data; |
480 | 480 |
481 xvid_encore(x->encoder_handle, XVID_ENC_DESTROY, NULL, NULL); | 481 xvid_encore(x->encoder_handle, XVID_ENC_DESTROY, NULL, NULL); |
482 | 482 |
483 if( avctx->extradata != NULL ) | 483 if( avctx->extradata != NULL ) |
484 av_free(avctx->extradata); | 484 av_freep(&avctx->extradata); |
485 if( x->twopassbuffer != NULL ) { | 485 if( x->twopassbuffer != NULL ) { |
486 av_free(x->twopassbuffer); | 486 av_free(x->twopassbuffer); |
487 av_free(x->old_twopassbuffer); | 487 av_free(x->old_twopassbuffer); |
488 } | 488 } |
489 if( x->twopassfile != NULL ) | 489 if( x->twopassfile != NULL ) |