Mercurial > mplayer.hg
changeset 28347:1f4b3aaefcd8
Avoid a division by 0 when using -oac mp3lame but no audio data actually is encoded.
author | reimar |
---|---|
date | Wed, 28 Jan 2009 12:46:05 +0000 |
parents | d6d819415c83 |
children | fb82979eb1db |
files | libmpcodecs/ae_lame.c |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/ae_lame.c Wed Jan 28 00:44:48 2009 +0000 +++ b/libmpcodecs/ae_lame.c Wed Jan 28 12:46:05 2009 +0000 @@ -136,6 +136,7 @@ // 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;