mirror of
https://github.com/mpv-player/mpv
synced 2025-01-24 19:37:30 +01:00
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
This commit is contained in:
parent
3788789408
commit
9c116d24e6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user