diff options
author | jstebbins <[email protected]> | 2011-04-22 14:51:59 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2011-04-22 14:51:59 +0000 |
commit | 63a726b5e80d17083b0f8bf3e96c5749df45bc98 (patch) | |
tree | fd57fe76264f11a0fb6c20a7701e944de81b5466 /libhb/fifo.c | |
parent | 263b4ff38b4b4cb695e1b7a1e69571fd7e621145 (diff) |
Add support for TrueHD and DTS-HD from BD sources
TrueHD and DTS-HD now show up in the audio list along side their
AC-3 and DTS counterparts.
Note that currently the DTS-HD decoder we are using (ffmpeg) discards
the HD portion of the stream and onle decodes the DTS core portion. So
there is no advantage yet to using the DTS-HD stream. In the future
I would like to add DTS-HD passthru support and hopefully ffmpeg will
improve their DTS-HD decoder.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3950 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/fifo.c')
-rw-r--r-- | libhb/fifo.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libhb/fifo.c b/libhb/fifo.c index 3f0d9ea86..232741e32 100644 --- a/libhb/fifo.c +++ b/libhb/fifo.c @@ -119,7 +119,13 @@ static hb_fifo_t *size_to_pool( int size ) hb_buffer_t * hb_buffer_init( int size ) { hb_buffer_t * b; - hb_fifo_t *buffer_pool = size_to_pool( size ); + // Certain libraries (hrm ffmpeg) expect buffers passed to them to + // end on certain alignments (ffmpeg is 8). So allocate some extra bytes. + // Note that we can't simply align the end of our buffer because + // sometimes we feed data to these libraries starting from arbitrary + // points within the buffer. + int alloc = size + 16; + hb_fifo_t *buffer_pool = size_to_pool( alloc ); if( buffer_pool ) { @@ -150,7 +156,7 @@ hb_buffer_t * hb_buffer_init( int size ) } b->size = size; - b->alloc = buffer_pool? buffer_pool->buffer_size : size; + b->alloc = buffer_pool ? buffer_pool->buffer_size : alloc; if (size) { |