[MPlayer-cvslog] r28382 - trunk/libmpcodecs/ae_lame.c
reimar
subversion at mplayerhq.hu
Wed Jan 28 13:46:05 CET 2009
Author: reimar
Date: Wed Jan 28 13:46:05 2009
New Revision: 28382
Log:
Avoid a division by 0 when using -oac mp3lame but no audio data actually is encoded.
Modified:
trunk/libmpcodecs/ae_lame.c
Modified: trunk/libmpcodecs/ae_lame.c
==============================================================================
--- trunk/libmpcodecs/ae_lame.c Wed Jan 28 01:44:48 2009 (r28381)
+++ trunk/libmpcodecs/ae_lame.c Wed Jan 28 13:46:05 2009 (r28382)
@@ -136,6 +136,7 @@ static void fixup(audio_encoder_t *encod
// 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;
More information about the MPlayer-cvslog
mailing list