avcodec/adpcm_ima_amv: restrict to 1 channel

The format doesn't allow for anything else.

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
This commit is contained in:
Zane van Iperen 2020-11-02 15:47:21 +10:00
parent 2fb764e1f3
commit d6912294d3
No known key found for this signature in database
GPG key ID: 68616B2D8AC4DCC5
2 changed files with 5 additions and 2 deletions

View file

@ -1696,7 +1696,7 @@ static int get_audio_frame_duration(enum AVCodecID id, int sr, int ch, int ba,
case AV_CODEC_ID_ADPCM_IMA_SMJPEG:
return (frame_bytes - 4) * 2 / ch;
case AV_CODEC_ID_ADPCM_IMA_AMV:
return (frame_bytes - 8) * 2 / ch;
return (frame_bytes - 8) * 2;
case AV_CODEC_ID_ADPCM_THP:
case AV_CODEC_ID_ADPCM_THP_LE:
if (extradata)