diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-01-28 12:46:05 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-01-28 12:46:05 +0000 |
commit | 9c116d24e6fea71081bcba25529d405dbe90bc6f (patch) | |
tree | 09f67a0fb095e7f387a8ed7e4994eb54ba5d9769 /libmpcodecs | |
parent | 3788789408b3def599a9e92923cf02c68508e529 (diff) | |
download | mpv-9c116d24e6fea71081bcba25529d405dbe90bc6f.tar.bz2 mpv-9c116d24e6fea71081bcba25529d405dbe90bc6f.tar.xz |
Avoid a division by 0 when using -oac mp3lame but no audio data actually is encoded.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28382 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/ae_lame.c | 1 |
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; |