ffplay: fix memleak of non-bitmap subtitles
authorMarton Balint <cus@passwd.hu>
Sun, 4 Aug 2013 16:49:02 +0000 (18:49 +0200)
committerMarton Balint <cus@passwd.hu>
Thu, 8 Aug 2013 22:16:13 +0000 (00:16 +0200)
Signed-off-by: Marton Balint <cus@passwd.hu>
ffplay.c

index cfb927e..53fb473 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -2048,6 +2048,8 @@ static int subtitle_thread(void *arg)
             SDL_LockMutex(is->subpq_mutex);
             is->subpq_size++;
             SDL_UnlockMutex(is->subpq_mutex);
+        } else if (got_subtitle) {
+            avsubtitle_free(&sp->sub);
         }
         av_free_packet(pkt);
     }