avplay: free the active audio packet at exit.
authorJustin Ruggles <justin.ruggles@gmail.com>
Wed, 12 Oct 2011 18:44:02 +0000 (14:44 -0400)
committerJustin Ruggles <justin.ruggles@gmail.com>
Wed, 12 Oct 2011 21:48:33 +0000 (17:48 -0400)
fixes a memleak

avplay.c

index c2b5e4b..a4b58a5 100644 (file)
--- a/avplay.c
+++ b/avplay.c
@@ -2268,6 +2268,7 @@ static void stream_component_close(VideoState *is, int stream_index)
         SDL_CloseAudio();
 
         packet_queue_end(&is->audioq);
+        av_free_packet(&is->audio_pkt);
         if (is->reformat_ctx)
             av_audio_convert_free(is->reformat_ctx);
         is->reformat_ctx = NULL;