summaryrefslogtreecommitdiff
path: root/libswresample
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-06-05 02:49:00 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-06-05 03:06:34 +0200
commit3289670142954e143b69f0a87583130140e16410 (patch)
tree3d1f73f7f83d57da281471f917a198046b127348 /libswresample
parent6bc4e36ba7c4f87a5ade89d53d91fc237e0a895b (diff)
downloadffmpeg-3289670142954e143b69f0a87583130140e16410.tar.gz
swr: dont treat 32 and 24 as equal in simple copy check
Fixes dithering from 32 to 24 bit Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample')
-rw-r--r--libswresample/swresample.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 012de02cf4..08b1aade4c 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -651,7 +651,8 @@ static int swr_convert_internal(struct SwrContext *s, AudioData *out, int out_co
if(s->resample_first ? !s->rematrix : !s->resample)
preout= midbuf;
- if(s->int_sample_fmt == s->out_sample_fmt && s->out.planar){
+ if(s->int_sample_fmt == s->out_sample_fmt && s->out.planar
+ && !(s->out_sample_fmt==AV_SAMPLE_FMT_S32P && (s->dither.output_sample_bits&31))){
if(preout==in){
out_count= FFMIN(out_count, in_count); //TODO check at the end if this is needed or redundant
av_assert0(s->in.planar); //we only support planar internally so it has to be, we support copying non planar though