mirror of
https://github.com/mpv-player/mpv
synced 2025-02-06 23:21:54 +00:00
the avi spec does not allow random samplesize whoever wrote this should be shot
also block align should be equal to sample size i dunno if this breaks anything but the old code was definitly not correct this also fixes amr_nb muxing (in .3gp with lavf for example) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21789 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
f89822df44
commit
6f0e3fb15d
@ -56,9 +56,12 @@ static int bind_lavc(audio_encoder_t *encoder, muxer_stream_t *mux_a)
|
||||
mux_a->h.dwSampleSize = 0; // Blocksize not constant
|
||||
}
|
||||
else
|
||||
mux_a->h.dwSampleSize = mux_a->h.dwScale;
|
||||
mux_a->h.dwSampleSize = 0;
|
||||
}
|
||||
mux_a->wf->nBlockAlign = mux_a->h.dwScale;
|
||||
if(mux_a->h.dwSampleSize)
|
||||
mux_a->wf->nBlockAlign = mux_a->h.dwSampleSize;
|
||||
else
|
||||
mux_a->wf->nBlockAlign = 1;
|
||||
mux_a->h.dwSuggestedBufferSize = (encoder->params.audio_preload*mux_a->wf->nAvgBytesPerSec)/1000;
|
||||
mux_a->h.dwSuggestedBufferSize -= mux_a->h.dwSuggestedBufferSize % mux_a->wf->nBlockAlign;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user