Carl Eugen Hoyos | 1 Jul 2011 02:43
Favicon

Fix possible double free when encoding using xvid.

ffmpeg | branch: release/0.7 | Carl Eugen Hoyos <cehoyos <at> ag.or.at> | Fri Jul  1 02:38:28 2011 +0200|
[00498a7e59727cfe51703d84ac55e055b47c8872] | committer: Carl Eugen Hoyos

Fix possible double free when encoding using xvid.
(cherry picked from commit 315f0e3fd8dcbd1362276b7407dad2e97cccc4b7)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=00498a7e59727cfe51703d84ac55e055b47c8872
---

 libavcodec/libxvidff.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libavcodec/libxvidff.c b/libavcodec/libxvidff.c
index 9b5c17c..effd2db 100644
--- a/libavcodec/libxvidff.c
+++ b/libavcodec/libxvidff.c
 <at>  <at>  -528,6 +528,7  <at>  <at>  static av_cold int xvid_encode_close(AVCodecContext *avctx) {
     if( x->twopassbuffer != NULL ) {
         av_free(x->twopassbuffer);
         av_free(x->old_twopassbuffer);
+        avctx->stats_out = NULL;
     }
     av_free(x->twopassfile);
     av_free(x->intra_matrix);

Gmane