History

avcodec/utils: unbreak BINKAUDIO_DCT duration calculation

Paul B Mahol committed 5 years ago

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

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
16681668 return 256 * sr / 245;
16691669 else if (id == AV_CODEC_ID_DST)
16701670 return 588 * sr / 44100;
1671−
1672− if (ch > 0) {
1673− /* calc from sample rate and channels */
1674− if (id == AV_CODEC_ID_BINKAUDIO_DCT) {
1675− if (sr / 22050 > 22)
1676− return 0;
1677− return (480 << (sr / 22050)) / ch;
1678− }
1671+ else if (id == AV_CODEC_ID_BINKAUDIO_DCT) {
1672+ if (sr / 22050 > 22)
1673+ return 0;
1674+ return (480 << (sr / 22050));
16791675 }
16801676
16811677 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