summaryrefslogtreecommitdiffstats
path: root/libhb/fifo.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2010-09-08 16:51:59 +0000
committerjstebbins <[email protected]>2010-09-08 16:51:59 +0000
commita007891bf9f7e53d3705c51b5b41f9e56a144031 (patch)
treeb7a532c24a458d549afb0174c374e631b896a46e /libhb/fifo.c
parent772c3574758e9bc29cb76bbc86343cf9ad5ddd71 (diff)
Add Bluray support
Unencrypted BD directory trees only. Doesn't support iso images. Also, no PGS subtitle support yet. Chapters and angles are supported. Adds a new contrib libbluray. Adds new option to hb_scan() for duration of short titles to filter. This applies to BD and DVD multi-title scans only. Does not apply to any single title scans. Fixes memory leak during scan. hb_buffer_close() was not freeing all buffers in a chain of buffers passed to it. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3510 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/fifo.c')
-rw-r--r--libhb/fifo.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/libhb/fifo.c b/libhb/fifo.c
index 3aeeea273..a29e84696 100644
--- a/libhb/fifo.c
+++ b/libhb/fifo.c
@@ -202,14 +202,19 @@ void hb_buffer_close( hb_buffer_t ** _b )
return;
}
/* either the pool is full or this size doesn't use a pool - free the buf */
- if( b->data )
+ while( b )
{
- free( b->data );
- hb_lock(buffers.lock);
- buffers.allocated -= b->alloc;
- hb_unlock(buffers.lock);
+ hb_buffer_t * next = b->next;
+ if( b->data )
+ {
+ free( b->data );
+ hb_lock(buffers.lock);
+ buffers.allocated -= b->alloc;
+ hb_unlock(buffers.lock);
+ }
+ free( b );
+ b = next;
}
- free( b );
*_b = NULL;
}