avplay: free rdft data used for spectrogram analysis.
authorJustin Ruggles <justin.ruggles@gmail.com>
Wed, 12 Oct 2011 18:38:02 +0000 (14:38 -0400)
committerJustin Ruggles <justin.ruggles@gmail.com>
Wed, 12 Oct 2011 21:48:33 +0000 (17:48 -0400)
fixes a memleak

avplay.c

index 8da50eb..c2b5e4b 100644 (file)
--- a/avplay.c
+++ b/avplay.c
@@ -2271,6 +2271,11 @@ static void stream_component_close(VideoState *is, int stream_index)
         if (is->reformat_ctx)
             av_audio_convert_free(is->reformat_ctx);
         is->reformat_ctx = NULL;
+
+        if (is->rdft) {
+            av_rdft_end(is->rdft);
+            av_freep(&is->rdft_data);
+        }
         break;
     case AVMEDIA_TYPE_VIDEO:
         packet_queue_abort(&is->videoq);