From 454478fa52d97a5590a05ae0222d582a3ec2f1dc Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 18 Nov 2012 21:03:32 +0000 Subject: Call processor process_end methods as required. Remove questionable padding of audio length up to the nearest second. Don't emit audio in big blocks as it seems to crash FFmpeg. Fix a few things. --- src/lib/transcoder.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/lib/transcoder.cc') diff --git a/src/lib/transcoder.cc b/src/lib/transcoder.cc index cad76af6e..537b9b664 100644 --- a/src/lib/transcoder.cc +++ b/src/lib/transcoder.cc @@ -109,12 +109,18 @@ Transcoder::go () } } catch (...) { - /* process_end() is important as the decoder may have worker - threads that need to be cleaned up. - */ _encoder->process_end (); throw; } - + + if (_delay_line) { + _delay_line->process_end (); + } + if (_matcher) { + _matcher->process_end (); + } + if (_gain) { + _gain->process_end (); + } _encoder->process_end (); } -- cgit v1.2.3