From 5fce207779ccc0e9f338dd670079588ff56a0475 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Wed, 21 Dec 2011 22:06:59 +0000 Subject: Fix corruption of buffer pools by render subs A subtitle buffer's "next" pointer was being modified after the buffer was closed which corrupts the buffer pool. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4380 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/sync.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libhb') diff --git a/libhb/sync.c b/libhb/sync.c index 6c1911b98..2c5bb9024 100644 --- a/libhb/sync.c +++ b/libhb/sync.c @@ -731,6 +731,10 @@ int syncVideoWork( hb_work_object_t * w, hb_buffer_t ** buf_in, if ( sync->sub_list == NULL ) sync->sub_tail = NULL; } + else if (sync->sub_tail == sub) + { + sync->sub_tail = prev_sub; + } // ...and trash it hb_buffer_t *next_sub = sub->next; -- cgit v1.2.3