aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authornu774 <honeycomb77@gmail.com>2014-05-16 20:25:46 +0900
committerLuca Barbato <lu_zero@gentoo.org>2014-05-17 15:24:20 +0200
commit584f88409062f7a134e7391887899e8e723ab6ff (patch)
tree461febd1ba29bce16f16e99f79dda1f7112fa0a5 /libavformat
parent34e2ce5dde073244ccb2b62f930e96fe612690f7 (diff)
downloadffmpeg-584f88409062f7a134e7391887899e8e723ab6ff.tar.gz
riff: Pass block_align to estimate frame duration
Fix incorrect wSamplesPerBlock(=0) written for ADPCM_IMA_WAV Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/riffenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/riffenc.c b/libavformat/riffenc.c
index 8479d9da38..fe92bc56ae 100644
--- a/libavformat/riffenc.c
+++ b/libavformat/riffenc.c
@@ -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;