summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-10-29 00:47:35 +0100
committerwm4 <wm4@nowhere>2012-10-30 19:50:24 +0100
commit6367ade0b069f1d9a646694a1420cb0363f2c585 (patch)
treef69ebf9f5cc912f845f28b3b9a38d185a399d220 /libmpdemux
parent5f236b3a82c5f4b222ee3a8bfb75f84799dd6d65 (diff)
downloadmpv-6367ade0b069f1d9a646694a1420cb0363f2c585.tar.bz2
mpv-6367ade0b069f1d9a646694a1420cb0363f2c585.tar.xz
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.
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_lavf.c2
1 files changed, 1 insertions, 1 deletions
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)