mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-02 21:33:52 +02:00
Slightly restructure code
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@ node_modules
|
|||||||
/dist
|
/dist
|
||||||
/dist-docs
|
/dist-docs
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.vitepress/cache
|
docs/.vitepress/cache
|
||||||
/docs/api
|
/docs/api
|
||||||
*.tsbuildinfo
|
*.tsbuildinfo
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
const track = await input.getPrimaryVideoTrack();
|
const track = await input.getPrimaryVideoTrack();
|
||||||
console.log(await track.computeFrameRateMetrics());
|
console.log(await track.getDecoderConfig());
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
|||||||
@@ -1387,23 +1387,31 @@ export class IsobmffDemuxer extends Demuxer {
|
|||||||
|
|
||||||
case 'avcC': {
|
case 'avcC': {
|
||||||
const track = this.currentTrack;
|
const track = this.currentTrack;
|
||||||
if (!track || boxInfo.contentSize === 0) {
|
if (!track) {
|
||||||
// FFmpeg will sometimes generate an empty avcC chunk if provided no headers
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
assert(track.info);
|
assert(track.info);
|
||||||
|
|
||||||
|
if (boxInfo.contentSize === 0) {
|
||||||
|
// avcC box is empty, let's treat this like an Annex B stream
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
track.info.codecDescription = readBytes(slice, boxInfo.contentSize);
|
track.info.codecDescription = readBytes(slice, boxInfo.contentSize);
|
||||||
}; break;
|
}; break;
|
||||||
|
|
||||||
case 'hvcC': {
|
case 'hvcC': {
|
||||||
const track = this.currentTrack;
|
const track = this.currentTrack;
|
||||||
if (!track || boxInfo.contentSize === 0) {
|
if (!track) {
|
||||||
// FFmpeg will sometimes generate an empty hvcC chunk if provided no headers
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
assert(track.info);
|
assert(track.info);
|
||||||
|
|
||||||
|
if (boxInfo.contentSize === 0) {
|
||||||
|
// hvcC box is empty, let's treat this like an Annex B stream
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
track.info.codecDescription = readBytes(slice, boxInfo.contentSize);
|
track.info.codecDescription = readBytes(slice, boxInfo.contentSize);
|
||||||
}; break;
|
}; break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user