History

swr: use assert in swri_sum2 to check that only supported formats are used.

Michael Niedermayer committed 14 years ago

Commit 7c673d71 parent db2eadb1 file · +1 −0Browse files

Unified · Split

libswresample/rematrix.c+1−0
@@ -276,6 +276,7 @@ void swri_sum2(enum AVSampleFormat format, void *dst, const void *src0, const vo · 275 unmodified lines
276 if(format == AV_SAMPLE_FMT_FLT){276 if(format == AV_SAMPLE_FMT_FLT){
277 sum2_float((float *)dst, (const float *)src0, (const float *)src1, coef0, coef1, len);277 sum2_float((float *)dst, (const float *)src0, (const float *)src1, coef0, coef1, len);
278 }else{278 }else{
279 av_assert1(format == AV_SAMPLE_FMT_S16);
279 sum2_s16 ((int16_t*)dst, (const int16_t*)src0, (const int16_t*)src1, lrintf(coef0 * 32768), lrintf(coef1 * 32768), len);280 sum2_s16 ((int16_t*)dst, (const int16_t*)src0, (const int16_t*)src1, lrintf(coef0 * 32768), lrintf(coef1 * 32768), len);
280 }281 }
281}282}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t