summaryrefslogtreecommitdiff
path: root/src/liblame_wrapper.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/liblame_wrapper.cc')
-rw-r--r--src/liblame_wrapper.cc6
1 files changed, 5 insertions, 1 deletions
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;
}