summaryrefslogtreecommitdiffstats
path: root/libavcodec/dcadec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-04 21:44:49 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-04 22:11:03 +0200
commit47313bbb5f52815e7e9bc20c0ddc747facf81845 (patch)
tree6a3ff88b708c4980d1fa1830ac2fb9be8082a412 /libavcodec/dcadec.c
parent6a0f9f27d576824fdf699dda1c9e985b9fada44d (diff)
downloadffmpeg-streaming-47313bbb5f52815e7e9bc20c0ddc747facf81845.zip
ffmpeg-streaming-47313bbb5f52815e7e9bc20c0ddc747facf81845.tar.gz
avcodec/dcadec: remove fishy FFMAX()
These where intended to maintain the previous behavior before dca_dmix_code() but it is unclear (to me) which way is correct and no sample seem to trigger the case, also they are incomplete for the purprose of error checking Found-by: Niels Möller <nisse@lysator.liu.se> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dcadec.c')
-rw-r--r--libavcodec/dcadec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c
index e23155c..9f6edc2 100644
--- a/libavcodec/dcadec.c
+++ b/libavcodec/dcadec.c
@@ -601,7 +601,7 @@ static int dca_parse_audio_coding_header(DCAContext *s, int base_channel,
if (get_bits1(&s->gb)) {
embedded_downmix = get_bits1(&s->gb);
coeff = get_bits(&s->gb, 6);
- scale_factor = -1.0f / dca_dmix_code(FFMAX(coeff<<2, 4)-3);
+ scale_factor = -1.0f / dca_dmix_code((coeff<<2)-3);
s->xxch_dmix_sf[s->xxch_chset] = scale_factor;
@@ -622,7 +622,7 @@ static int dca_parse_audio_coding_header(DCAContext *s, int base_channel,
coeff = get_bits(&s->gb, 7);
ichan = dca_xxch2index(s, 1 << i);
- s->xxch_dmix_coeff[j][ichan] = dca_dmix_code(FFMAX(coeff<<2, 3)-3);
+ s->xxch_dmix_coeff[j][ichan] = dca_dmix_code((coeff<<2)-3);
}
}
}
OpenPOWER on IntegriCloud