History

avcodec/utils: unbreak BINKAUDIO_DCT duration calculation

Paul B Mahol committed 5 years ago

Commit 89e2fbc1 parent 57651491 file · +4 −8Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/utils.c+4−8
@@ -1668,14 +1668,10 @@ static int get_audio_frame_duration(enum AVCodecID id, int sr, int ch, int ba, · 1667 unmodified lines
1668 return 256 * sr / 245;1668 return 256 * sr / 245;
1669 else if (id == AV_CODEC_ID_DST)1669 else if (id == AV_CODEC_ID_DST)
1670 return 588 * sr / 44100;1670 return 588 * sr / 44100;
1671 1671 else if (id == AV_CODEC_ID_BINKAUDIO_DCT) {
1672 if (ch > 0) {1672 if (sr / 22050 > 22)
1673 /* calc from sample rate and channels */1673 return 0;
1674 if (id == AV_CODEC_ID_BINKAUDIO_DCT) {1674 return (480 << (sr / 22050));
1675 if (sr / 22050 > 22)
1676 return 0;
1677 return (480 << (sr / 22050)) / ch;
1678 }
1679 }1675 }
1680 1676
1681 if (id == AV_CODEC_ID_MP3)1677 if (id == AV_CODEC_ID_MP3)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t