]> granicus.if.org Git - libass/commitdiff
Test program: free track/renderer/library
authorGrigori Goronzy <greg@blackbox>
Fri, 24 Jul 2009 07:59:47 +0000 (09:59 +0200)
committerGrigori Goronzy <greg@blackbox>
Fri, 24 Jul 2009 13:39:20 +0000 (15:39 +0200)
In the test program, free the track, renderer and library properly.
This is useful for memory leak testing.

test/test.c

index 68099868cbea399c69e9bab1d9efc3713af7e9f6..ac4bfe6959391152492ce03740bb2e09bafe64c0 100644 (file)
@@ -175,6 +175,11 @@ int main(int argc, char *argv[])
         ass_render_frame(ass_renderer, track, (int) (tm * 1000), NULL);
     image_t *frame = gen_image(frame_w, frame_h);
     blend(frame, img);
+
+    ass_free_track(track);
+    ass_renderer_done(ass_renderer);
+    ass_library_done(ass_library);
+
     write_png(imgfile, frame);
 
     return 0;