mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
ra144enc: zero the reflection coeffs if the filter is unstable
fixes use of uninitialized values if the filter is still unstable after using the previous frame lpc coefficients.
This commit is contained in:
parent
131609dc2a
commit
9a3f10695a
@ -477,7 +477,10 @@ static int ra144_encode_frame(AVCodecContext *avctx, uint8_t *frame,
|
||||
* The filter is unstable: use the coefficients of the previous frame.
|
||||
*/
|
||||
ff_int_to_int16(block_coefs[NBLOCKS - 1], ractx->lpc_coef[1]);
|
||||
ff_eval_refl(lpc_refl, block_coefs[NBLOCKS - 1], avctx);
|
||||
if (ff_eval_refl(lpc_refl, block_coefs[NBLOCKS - 1], avctx)) {
|
||||
/* the filter is still unstable. set reflection coeffs to zero. */
|
||||
memset(lpc_refl, 0, sizeof(lpc_refl));
|
||||
}
|
||||
}
|
||||
init_put_bits(&pb, frame, buf_size);
|
||||
for (i = 0; i < LPC_ORDER; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user