Browse Source

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>
tags/n2.3
nu774 Luca Barbato 11 years ago
parent
commit
584f884090
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/riffenc.c

+ 1
- 1
libavformat/riffenc.c View File

@@ -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;



Loading…
Cancel
Save