From 6367ade0b069f1d9a646694a1420cb0363f2c585 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 29 Oct 2012 00:47:35 +0100 Subject: 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 296f360f82e5. 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. --- libmpdemux/demux_lavf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index c619d00b72..dadf81e146 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -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) -- cgit v1.2.3