[FFmpeg-cvslog] r23867 - trunk/libavcodec/psymodel.c

alexc subversion
Mon Jun 28 23:36:20 CEST 2010


Author: alexc
Date: Mon Jun 28 23:36:19 2010
New Revision: 23867

Log:
Make ff_psy_preprocess_end() act like av_freep().

Modified:
   trunk/libavcodec/psymodel.c

Modified: trunk/libavcodec/psymodel.c
==============================================================================
--- trunk/libavcodec/psymodel.c	Mon Jun 28 23:34:57 2010	(r23866)
+++ trunk/libavcodec/psymodel.c	Mon Jun 28 23:36:19 2010	(r23867)
@@ -117,11 +117,14 @@ void ff_psy_preprocess(struct FFPsyPrepr
 
 av_cold void ff_psy_preprocess_end(struct FFPsyPreprocessContext *ctx)
 {
+    if (ctx) {
     int i;
     ff_iir_filter_free_coeffs(ctx->fcoeffs);
     if (ctx->fstate)
         for (i = 0; i < ctx->avctx->channels; i++)
             ff_iir_filter_free_state(ctx->fstate[i]);
     av_freep(&ctx->fstate);
+    }
+    ctx = NULL;
 }
 



More information about the ffmpeg-cvslog mailing list