mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 10:53:50 +02:00
Make MP3 next frame location more strict for better recovery (fixes #382), fix Date timezone for ID3 tags
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { test } from 'vitest';
|
||||
import { Input } from '../../src/input.js';
|
||||
import { UrlSource } from '../../src/source.js';
|
||||
import { ALL_FORMATS } from '../../src/input-format.js';
|
||||
import { assert } from '../../src/misc.js';
|
||||
import { AudioSampleSink } from '../../src/media-sink.js';
|
||||
|
||||
// "joined" in the sense that it was two separate MP3s that were spliced together (I think)
|
||||
test('Can decode malformed joined MP3', async () => {
|
||||
using input = new Input({
|
||||
source: new UrlSource('/malformed-join.mp3'),
|
||||
formats: ALL_FORMATS,
|
||||
});
|
||||
|
||||
const audioTrack = await input.getPrimaryAudioTrack();
|
||||
assert(audioTrack);
|
||||
|
||||
const sink = new AudioSampleSink(audioTrack);
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
for await (using sample of sink.samples());
|
||||
});
|
||||
Reference in New Issue
Block a user