Skip to content
Snippets Groups Projects
Commit 34030564 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

riff: fix division by zero for G726


Fixes CID717752
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 9de5b11d
No related branches found
No related tags found
No related merge requests found
...@@ -661,7 +661,7 @@ int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size) ...@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment