mirror of https://github.com/mpv-player/mpv
demux_lavf, ad_ffmpeg: don't change AVCodecContext.block_align
If block_align was 0, demux_lavf changed it to 1. This breaks at least
decoding of IMA ADPCM in LVF. Pass it through without changing instead.
(nBlockAlign as set in demux_lavf is put back into lavc's block_align
in ad_ffmpeg.)
This reverts 296f360f82
. This commit gives no explanation why it does
things the way it does. But since nothing in mpv uses nBlockAlign
anymore except ad_ffmpeg, this is probably safe.
This commit is contained in:
parent
5f236b3a82
commit
6367ade0b0
|
@ -335,7 +335,7 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i)
|
|||
wf->nChannels = codec->channels;
|
||||
wf->nSamplesPerSec = codec->sample_rate;
|
||||
wf->nAvgBytesPerSec = codec->bit_rate / 8;
|
||||
wf->nBlockAlign = codec->block_align ? codec->block_align : 1;
|
||||
wf->nBlockAlign = codec->block_align;
|
||||
wf->wBitsPerSample = codec->bits_per_coded_sample;
|
||||
wf->cbSize = codec->extradata_size;
|
||||
if (codec->extradata_size)
|
||||
|
|
Loading…
Reference in New Issue