diff options
author | Carl Eugen Hoyos <ceffmpeg@gmail.com> | 2020-04-05 17:04:44 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <ceffmpeg@gmail.com> | 2020-04-05 17:24:57 +0200 |
commit | 559c2e96e371f30eedccf370d4606fc86706ab75 (patch) | |
tree | 22f3ba1c04b6a1e74fa999826909ec391fc9f670 /libavcodec/amrwbdec.c | |
parent | 8b1f07ef518a0ad9cc6a456bc62869c76fa3461f (diff) | |
download | ffmpeg-559c2e96e371f30eedccf370d4606fc86706ab75.tar.gz |
lavc/amrwbdec: Use av_samples_set_silence().
Suggested-by: James Almer
Diffstat (limited to 'libavcodec/amrwbdec.c')
-rw-r--r-- | libavcodec/amrwbdec.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c index b488a5d3c7..5943bfc84e 100644 --- a/libavcodec/amrwbdec.c +++ b/libavcodec/amrwbdec.c @@ -1122,8 +1122,7 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, expected_fr_size = ((cf_sizes_wb[ctx->fr_cur_mode] + 7) >> 3) + 1; if (ctx->fr_cur_mode == NO_DATA) { - for (i = 0; i < frame->nb_samples; i++) - buf_out[i] = 0.f; + av_samples_set_silence(&frame->data[0], 0, frame->nb_samples, 1, AV_SAMPLE_FMT_FLT); *got_frame_ptr = 1; return expected_fr_size; } |