summaryrefslogtreecommitdiff
path: root/libswresample/swresample.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-09 22:46:32 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-09 23:28:08 +0100
commit3ef06f3415a4693c435bd72a59fedaf4d325a5d9 (patch)
tree3f6cbb746dfded4f717a88d06ae35603c941e954 /libswresample/swresample.c
parentdc60ecdbeb11ef14a85a60ab06154b067e5e1f02 (diff)
swr: split swri_dither_init() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/swresample.c')
-rw-r--r--libswresample/swresample.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 7001f23201..5e0e4aa403 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -230,6 +230,7 @@ av_cold void swr_free(SwrContext **ss){
}
av_cold int swr_init(struct SwrContext *s){
+ int ret;
s->in_buffer_index= 0;
s->in_buffer_count= 0;
s->resample_in_constraint= 0;
@@ -391,7 +392,8 @@ av_assert0(s->out.ch_count);
set_audiodata_fmt(&s->in_buffer, s->int_sample_fmt);
}
- s->dither.noise = s->preout;
+ if ((ret = swri_dither_init(s, s->out_sample_fmt, s->int_sample_fmt)) < 0)
+ return ret;
if(s->rematrix || s->dither.method)
return swri_rematrix_init(s);