Commit 559c2e96 authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

lavc/amrwbdec: Use av_samples_set_silence().

Suggested-by: James Almer
parent 8b1f07ef
...@@ -1122,8 +1122,7 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, ...@@ -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; expected_fr_size = ((cf_sizes_wb[ctx->fr_cur_mode] + 7) >> 3) + 1;
if (ctx->fr_cur_mode == NO_DATA) { if (ctx->fr_cur_mode == NO_DATA) {
for (i = 0; i < frame->nb_samples; i++) av_samples_set_silence(&frame->data[0], 0, frame->nb_samples, 1, AV_SAMPLE_FMT_FLT);
buf_out[i] = 0.f;
*got_frame_ptr = 1; *got_frame_ptr = 1;
return expected_fr_size; return expected_fr_size;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment