mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
av_get_audio_frame_duration: add ADPCM_AFC
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
c5607dfddc
commit
5a3370816f
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user