[FFmpeg-cvslog] riff: Pass block_align to estimate frame duration

nu774 git at videolan.org
Sat May 17 20:27:46 CEST 2014


ffmpeg | branch: master | nu774 <honeycomb77 at gmail.com> | Fri May 16 20:25:46 2014 +0900| [584f88409062f7a134e7391887899e8e723ab6ff] | committer: Luca Barbato

riff: Pass block_align to estimate frame duration

Fix incorrect wSamplesPerBlock(=0) written for ADPCM_IMA_WAV

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=584f88409062f7a134e7391887899e8e723ab6ff
---

 libavformat/riffenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/riffenc.c b/libavformat/riffenc.c
index 8479d9d..fe92bc5 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;
 



More information about the ffmpeg-cvslog mailing list