summaryrefslogtreecommitdiffstats
path: root/libhb/render.c
diff options
context:
space:
mode:
authorjbrjake <[email protected]>2008-04-13 01:37:02 +0000
committerjbrjake <[email protected]>2008-04-13 01:37:02 +0000
commiteb8914db8ba4c5aa78b69b5500245d861d5ecd5c (patch)
tree7ad3c04850fab12d53028df4abfaab3b4df9f47e /libhb/render.c
parent86ac2730fdfbb06a65a34ea46156d01f7419e14c (diff)
When dropping frames from pullup for VFR, deallocate the associated subtitle buffers instead of just hb_fifo_get-ing them into nowhere.
This should plug the crash-inducing memory leak Cyander noticed. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1410 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/render.c')
-rw-r--r--libhb/render.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libhb/render.c b/libhb/render.c
index 275d05589..d12937e7a 100644
--- a/libhb/render.c
+++ b/libhb/render.c
@@ -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