aboutsummaryrefslogtreecommitdiffstats
path: root/libavresample/audio_mix.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-04 22:39:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-08-04 23:51:43 +0200
commite776ee8f294984f7643a3c45db803c7266e1edfd (patch)
treea1fd00ab7a0760ec0f2848aed9dc3f79d889e816 /libavresample/audio_mix.c
parent88fc1438c693ffb7793aeb111d89775440491840 (diff)
parent8821ae649e61097ec57ca58472c3e4239c82913c (diff)
downloadffmpeg-e776ee8f294984f7643a3c45db803c7266e1edfd.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: lavr: fix handling of custom mix matrices fate: force pix_fmt in lagarith-rgb32 test fate: add tests for lagarith lossless video codec. ARMv6: vp8: fix stack allocation with Apple's assembler ARM: vp56: allow inline asm to build with clang fft: 3dnow: fix register name typo in DECL_IMDCT macro x86: dct32: port to cpuflags x86: build: replace mmx2 by mmxext Revert "wmapro: prevent division by zero when sample rate is unspecified" wmapro: prevent division by zero when sample rate is unspecified lagarith: fix color plane inversion for YUY2 output. lagarith: pad RGB buffer by 1 byte. dsputil: make add_hfyu_left_prediction_sse4() support unaligned src. Conflicts: doc/APIchanges libavcodec/lagarith.c libavfilter/x86/gradfun.c libavutil/cpu.h libavutil/version.h libswscale/utils.c libswscale/version.h libswscale/x86/yuv2rgb.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavresample/audio_mix.c')
-rw-r--r--libavresample/audio_mix.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libavresample/audio_mix.c b/libavresample/audio_mix.c
index 2c2a356844..e8ab2e3ee7 100644
--- a/libavresample/audio_mix.c
+++ b/libavresample/audio_mix.c
@@ -314,7 +314,15 @@ int ff_audio_mix_init(AVAudioResampleContext *avr)
}
/* build matrix if the user did not already set one */
- if (!avr->am->matrix) {
+ if (avr->am->matrix) {
+ if (avr->am->coeff_type != avr->mix_coeff_type ||
+ avr->am->in_layout != avr->in_channel_layout ||
+ avr->am->out_layout != avr->out_channel_layout) {
+ av_log(avr, AV_LOG_ERROR,
+ "Custom matrix does not match current parameters\n");
+ return AVERROR(EINVAL);
+ }
+ } else {
int i, j;
char in_layout_name[128];
char out_layout_name[128];