mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
swr: use assert in swri_sum2 to check that only supported formats are used.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
db2eadb2f5
commit
7c673d73ec
@ -276,6 +276,7 @@ void swri_sum2(enum AVSampleFormat format, void *dst, const void *src0, const vo
|
|||||||
if(format == AV_SAMPLE_FMT_FLT){
|
if(format == AV_SAMPLE_FMT_FLT){
|
||||||
sum2_float((float *)dst, (const float *)src0, (const float *)src1, coef0, coef1, len);
|
sum2_float((float *)dst, (const float *)src0, (const float *)src1, coef0, coef1, len);
|
||||||
}else{
|
}else{
|
||||||
|
av_assert1(format == AV_SAMPLE_FMT_S16);
|
||||||
sum2_s16 ((int16_t*)dst, (const int16_t*)src0, (const int16_t*)src1, lrintf(coef0 * 32768), lrintf(coef1 * 32768), len);
|
sum2_s16 ((int16_t*)dst, (const int16_t*)src0, (const int16_t*)src1, lrintf(coef0 * 32768), lrintf(coef1 * 32768), len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user