We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d783cc commit 08c1886Copy full SHA for 08c1886
src/api/demuxer.ts
@@ -1913,7 +1913,7 @@ export class Demuxer implements AsyncDisposable, Disposable {
1913
switch (par.codecType) {
1914
case AVMEDIA_TYPE_AUDIO:
1915
// Audio: duration from sample_rate or packet duration
1916
- if (par.sampleRate > 0) {
+ if (par.sampleRate >= 1 && par.frameSize > 0) {
1917
state.nextDts += (BigInt(AV_TIME_BASE) * BigInt(par.frameSize)) / BigInt(par.sampleRate);
1918
} else {
1919
state.nextDts += avRescaleQ(packet.duration, packet.timeBase, AV_TIME_BASE_Q);
0 commit comments