From 701608f39c59b530f6cede66ec24e9ddda8beae6 Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 12 Sep 2005 15:34:25 +0000 Subject: *** empty log message *** --- src/liblame_wrapper.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/liblame_wrapper.cc') diff --git a/src/liblame_wrapper.cc b/src/liblame_wrapper.cc index 5868c86..6d78380 100644 --- a/src/liblame_wrapper.cc +++ b/src/liblame_wrapper.cc @@ -48,7 +48,7 @@ LibLAMEWrapper::LibLAMEWrapper(Info *i) lame_set_mode(gfp, STEREO); lame_set_brate(gfp, config->readInt("mp3_bitrate")); - lame_set_strict_ISO(gfp, 0); + lame_set_strict_ISO(gfp, 1); // 1 = write a Xing VBR header frame. lame_set_bWriteVbrTag(gfp, 0); @@ -189,11 +189,15 @@ Frame *LibLAMEWrapper::encode(Frame *dvframe) * * return code = number of bytes output to mp3buf. Can be 0 */ + int flush_sz = lame_encode_flush_nogap(gfp, // global context handle mp3buf + val, // pointer to encoded MP3 stream mp3buf_size - val); // number of valid octets in this stream audio_frame->size = val + flush_sz; + // Bits pr. second + audio_frame->bitrate = config->readInt("mp3_bitrate") * 1000; + return audio_frame; } -- cgit v1.2.3