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/decavcodec.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/decavcodec.c')
-rw-r--r-- | libhb/decavcodec.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index c49dcc79c..2ad3993a0 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -164,6 +164,14 @@ static int decavcodecWork( hb_work_object_t * w, hb_buffer_t ** buf_in, unsigned char *parser_output_buffer; int parser_output_buffer_len; + if ( (*buf_in)->size <= 0 ) + { + /* EOF on input stream - send it downstream & say that we're done */ + *buf_out = *buf_in; + *buf_in = NULL; + return HB_WORK_DONE; + } + *buf_out = NULL; cur = ( in->start < 0 )? pv->pts_next : in->start; @@ -842,6 +850,14 @@ static void decodeAudio( hb_work_private_t *pv, uint8_t *data, int size ) static int decavcodecaiWork( hb_work_object_t *w, hb_buffer_t **buf_in, hb_buffer_t **buf_out ) { + if ( (*buf_in)->size <= 0 ) + { + /* EOF on input stream - send it downstream & say that we're done */ + *buf_out = *buf_in; + *buf_in = NULL; + return HB_WORK_DONE; + } + hb_work_private_t *pv = w->private_data; if ( ! pv->context ) { |