Commit 584f8840 authored by nu774's avatar nu774 Committed by Luca Barbato
Browse files

riff: Pass block_align to estimate frame duration



Fix incorrect wSamplesPerBlock(=0) written for ADPCM_IMA_WAV
Signed-off-by: default avatarLuca Barbato <lu_zero@gentoo.org>
parent 34e2ce5d
......@@ -62,7 +62,7 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc)
/* We use the known constant frame size for the codec if known, otherwise
* fall back on using AVCodecContext.frame_size, which is not as reliable
* for indicating packet duration. */
frame_size = av_get_audio_frame_duration(enc, 0);
frame_size = av_get_audio_frame_duration(enc, enc->block_align);
if (!frame_size)
frame_size = enc->frame_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