OSDN Git Service

When dropping frames from pullup for VFR, deallocate the associated subtitle buffers...
authorjbrjake <jbrjake@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 13 Apr 2008 01:37:02 +0000 (01:37 +0000)
committerjbrjake <jbrjake@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 13 Apr 2008 01:37:02 +0000 (01:37 +0000)
This should plug the crash-inducing memory leak Cyander noticed.

git-svn-id: svn://localhost/HandBrake/trunk@1410 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/render.c

index 275d055..d12937e 100644 (file)
@@ -307,7 +307,10 @@ int renderWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
                     pv->total_lost_time += temp_duration;
                     pv->dropped_frames++;
 
-                    hb_fifo_get( pv->subtitle_queue );
+                    /* Pop the frame's subtitle and dispose of it. */
+                    hb_buffer_t * subtitles = hb_fifo_get( pv->subtitle_queue );
+                    hb_buffer_close( &subtitles );
+
                     buf_tmp_in = NULL;
                 }
                 else