aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--libmpcodecs/ae_lame.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libmpcodecs/ae_lame.c b/libmpcodecs/ae_lame.c
index c539d6ba6d..14cdcc6ac1 100644
--- a/libmpcodecs/ae_lame.c
+++ b/libmpcodecs/ae_lame.c
@@ -136,6 +136,7 @@ static void fixup(audio_encoder_t *encoder)
// fixup CBR mp3 audio header:
if(!lame_param_vbr) {
encoder->stream->h.dwSampleSize=1;
+ if (encoder->stream->h.dwLength)
((MPEGLAYER3WAVEFORMAT*)(encoder->stream->wf))->nBlockSize=
(encoder->stream->size+(encoder->stream->h.dwLength>>1))/encoder->stream->h.dwLength;
encoder->stream->h.dwLength=encoder->stream->size;