mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-11 17:55:21 +00:00
riff: fix division by zero for G726
Fixes CID717752 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
9de5b11d58
commit
340305646a
@ -661,7 +661,7 @@ int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size)
|
|||||||
codec->sample_rate = 0;
|
codec->sample_rate = 0;
|
||||||
}
|
}
|
||||||
/* override bits_per_coded_sample for G.726 */
|
/* override bits_per_coded_sample for G.726 */
|
||||||
if (codec->codec_id == AV_CODEC_ID_ADPCM_G726)
|
if (codec->codec_id == AV_CODEC_ID_ADPCM_G726 && codec->sample_rate)
|
||||||
codec->bits_per_coded_sample = codec->bit_rate / codec->sample_rate;
|
codec->bits_per_coded_sample = codec->bit_rate / codec->sample_rate;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user