avplay: reset rdft when closing stream.
authorJustin Ruggles <justin.ruggles@gmail.com>
Tue, 8 Nov 2011 15:33:18 +0000 (10:33 -0500)
committerJustin Ruggles <justin.ruggles@gmail.com>
Tue, 8 Nov 2011 15:43:57 +0000 (10:43 -0500)
this fixes a crash when cycling audio streams if the spectrograph is
displayed.

avplay.c

index c67cc75..01c0f11 100644 (file)
--- a/avplay.c
+++ b/avplay.c
@@ -2279,6 +2279,8 @@ static void stream_component_close(VideoState *is, int stream_index)
         if (is->rdft) {
             av_rdft_end(is->rdft);
             av_freep(&is->rdft_data);
+            is->rdft = NULL;
+            is->rdft_bits = 0;
         }
         break;
     case AVMEDIA_TYPE_VIDEO: