diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-05-12 13:00:29 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-05-17 02:08:58 +0200 |
commit | e609cfd697f8eed7325591f767585041719807d1 (patch) | |
tree | de8a4644b6f5192633100b191d58a10bdcba1327 /libavcodec/flacdsp.c | |
parent | 38f5a266eed1160e87da8e832a0a07818d7673cb (diff) | |
download | ffmpeg-e609cfd697f8eed7325591f767585041719807d1.tar.gz |
lavc/flac: Fix encoding and decoding with high lpc.
Based on an analysis by trac user lvqcl.
Fixes ticket #4421, reported by Chase Walker.
Diffstat (limited to 'libavcodec/flacdsp.c')
-rw-r--r-- | libavcodec/flacdsp.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libavcodec/flacdsp.c b/libavcodec/flacdsp.c index a83eb833b5..30b66484e8 100644 --- a/libavcodec/flacdsp.c +++ b/libavcodec/flacdsp.c @@ -88,13 +88,10 @@ static void flac_lpc_32_c(int32_t *decoded, const int coeffs[32], av_cold void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps) { - if (bps > 16) { - c->lpc = flac_lpc_32_c; - c->lpc_encode = flac_lpc_encode_c_32; - } else { - c->lpc = flac_lpc_16_c; - c->lpc_encode = flac_lpc_encode_c_16; - } + c->lpc16 = flac_lpc_16_c; + c->lpc32 = flac_lpc_32_c; + c->lpc16_encode = flac_lpc_encode_c_16; + c->lpc32_encode = flac_lpc_encode_c_32; switch (fmt) { case AV_SAMPLE_FMT_S32: |