Commit 5a337081 authored by Paul B Mahol's avatar Paul B Mahol

av_get_audio_frame_duration: add ADPCM_AFC

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent c5607dfd
...@@ -2465,6 +2465,8 @@ int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes) ...@@ -2465,6 +2465,8 @@ int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes)
if (ch > 0) { if (ch > 0) {
/* calc from frame_bytes and channels */ /* calc from frame_bytes and channels */
switch (id) { switch (id) {
case AV_CODEC_ID_ADPCM_AFC:
return frame_bytes / (9 * ch) * 16;
case AV_CODEC_ID_ADPCM_4XM: case AV_CODEC_ID_ADPCM_4XM:
case AV_CODEC_ID_ADPCM_IMA_ISS: case AV_CODEC_ID_ADPCM_IMA_ISS:
return (frame_bytes - 4 * ch) * 2 / ch; return (frame_bytes - 4 * ch) * 2 / ch;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment