diff options
author | van <[email protected]> | 2008-07-26 01:04:00 +0000 |
---|---|---|
committer | van <[email protected]> | 2008-07-26 01:04:00 +0000 |
commit | e529b1dbda55f01e21fe6fb04ee7f85c2e755725 (patch) | |
tree | 1748a00de07c035323dc9c3c9597ec9fefdeae7e /libhb/reader.c | |
parent | e3298b9003a7ee6070842516818bc08d8b0a65ed (diff) |
- in encx264, if an video frame is larger than init_delay split it into pieces so we don't get jerky output caused by out-of-order frames.
- add an explicit EOF for all streams, not just video.
- don't generate extra audio silence at the end of an encode (don't need it with explicit eof).
- get rid of 80ms initial delay in AAC encode & flush final four frames buffered in encoder.
- put mp4 'chap' atom on first track (usually video) rather than first audio track since we can now do video without audio (atom just needs to go on an enabled media track & video is always enabled).
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1581 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/reader.c')
-rw-r--r-- | libhb/reader.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/libhb/reader.c b/libhb/reader.c index d789993f7..b06816d3d 100644 --- a/libhb/reader.c +++ b/libhb/reader.c @@ -69,7 +69,7 @@ static void push_buf( const hb_reader_t *r, hb_fifo_t *fifo, hb_buffer_t *buf ) while( !*r->die && !r->job->done && hb_fifo_is_full( fifo ) ) { /* - * Loop until the incoming fifo is reaqdy to receive + * Loop until the incoming fifo is ready to receive * this buffer. */ hb_snooze( 50 ); @@ -326,8 +326,16 @@ static void ReaderFunc( void * _r ) } } - /* send an empty buffer upstream to signal we're done */ - hb_fifo_push( r->job->fifo_mpeg2, hb_buffer_init(0) ); + /* send empty buffers upstream to video & audio decoders to signal we're done */ + push_buf( r, r->job->fifo_mpeg2, hb_buffer_init(0) ); + + hb_audio_t *audio; + for( n = 0; + ( audio = hb_list_item( r->job->title->list_audio, n ) ) != NULL; + ++n ) + { + push_buf( r, audio->priv.fifo_in, hb_buffer_init(0) ); + } hb_list_empty( &list ); hb_buffer_close( &ps ); |