Fixup 3 - remove small risk of crash if encode_setup called incorrectly
This commit is contained in:
parent
de55acf797
commit
201c97fdf8
|
@ -340,6 +340,7 @@ make_wav_header(struct encode_ctx *ctx, struct decode_ctx *src_ctx, off_t *est_s
|
|||
bps = av_get_bits_per_sample(ctx->settings.audio_codec);
|
||||
wav_len = ctx->settings.channels * (bps / 8) * ctx->settings.sample_rate * (duration / 1000);
|
||||
|
||||
if (est_size)
|
||||
*est_size = wav_len + sizeof(ctx->header);
|
||||
|
||||
memcpy(ctx->header, "RIFF", 4);
|
||||
|
|
Loading…
Reference in New Issue