diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-11 09:57:38 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-11 10:02:00 +0200 |
commit | f9a2c5bc07fbcc6fa5bb6b53d3abe6ea3c0e3002 (patch) | |
tree | 75fdd6379dfaef6a25331cc26fa3958a64329b2f /libswresample/rematrix.c | |
parent | 6e9c634c36f00822cdd2d49f875be128112dd668 (diff) | |
download | ffmpeg-f9a2c5bc07fbcc6fa5bb6b53d3abe6ea3c0e3002.tar.gz |
swr: simplify code by using av_get_bytes_per_sample()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/rematrix.c')
-rw-r--r-- | libswresample/rematrix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c index 845f854335..44319792ea 100644 --- a/libswresample/rematrix.c +++ b/libswresample/rematrix.c @@ -290,7 +290,7 @@ int swri_rematrix(SwrContext *s, AudioData *out, AudioData *in, int len, int mus for(out_i=0; out_i<out->ch_count; out_i++){ switch(s->matrix_ch[out_i][0]){ case 0: - memset(out->ch[out_i], 0, len * (s->int_sample_fmt == AV_SAMPLE_FMT_FLT ? sizeof(float) : sizeof(int16_t))); + memset(out->ch[out_i], 0, len * av_get_bytes_per_sample(s->int_sample_fmt)); break; case 1: in_i= s->matrix_ch[out_i][1]; |