diff options
Diffstat (limited to 'libhb/sync.c')
-rw-r--r-- | libhb/sync.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libhb/sync.c b/libhb/sync.c index 73a1071e3..9c202c250 100644 --- a/libhb/sync.c +++ b/libhb/sync.c @@ -1085,6 +1085,13 @@ static hb_buffer_t * OutputAudioFrame( hb_audio_t *audio, hb_buffer_t *buf, } hb_buffer_close( &buf_raw ); + if (sync->data.output_frames_gen <= 0) + { + // XXX: don't send empty buffers downstream (EOF) + // possibly out-of-sync audio is better than no audio at all + hb_buffer_close(&buf); + return NULL; + } buf->size = sync->data.output_frames_gen * sample_size; duration = (double)( sync->data.output_frames_gen * 90000 ) / audio->config.out.samplerate; |