fixed parsing videos with skippable boxes in meta box

This commit is contained in:
Thibault Deckers 2023-04-27 18:12:04 +02:00
parent c75c75fc4d
commit a435bfdf27
4 changed files with 5 additions and 6 deletions

View file

@ -16,6 +16,7 @@ All notable changes to this project will be documented in this file.
- Viewer: multi-page context update when removing burst entries
- prevent editing item when Exif editing changes mime type
- parsing videos with skippable boxes in `meta` box
## <a id="v1.8.5"></a>[v1.8.5] - 2023-04-18

View file

@ -216,8 +216,8 @@ dependencies {
// - https://jitpack.io/p/deckerst/mp4parser
// - https://jitpack.io/p/deckerst/pixymeta-android
implementation 'com.github.deckerst:Android-TiffBitmapFactory:876e53870a'
implementation 'com.github.deckerst.mp4parser:isoparser:7b698ab674'
implementation 'com.github.deckerst.mp4parser:muxer:7b698ab674'
implementation 'com.github.deckerst.mp4parser:isoparser:42f2cdc087'
implementation 'com.github.deckerst.mp4parser:muxer:42f2cdc087'
implementation 'com.github.deckerst:pixymeta-android:706bd73d6e'
// huawei flavor only

View file

@ -152,10 +152,6 @@ object XMP {
pfd.use {
FileInputStream(it.fileDescriptor).use { stream ->
stream.channel.use { channel ->
// TODO TLAD [mp4] `IsoFile` init may fail if a skipped box has a `org.mp4parser.boxes.iso14496.part12.MetaBox` as parent,
// because `MetaBox.parse()` changes the argument `dataSource` to a `RewindableReadableByteChannel`,
// so it is no longer a seekable `FileChannel`, which is a requirement to skip boxes.
// creating `IsoFile` with a `File` or a `File.inputStream()` yields `No such device`
IsoFile(channel, Mp4ParserHelper.metadataBoxParser()).use { isoFile ->
isoFile.processBoxes(UserBox::class.java, true) { box, _ ->

View file

@ -142,6 +142,8 @@ class _MetadataSectionSliverState extends State<MetadataSectionSliver> {
}
Future<void> _getMetadata() async {
if (!mounted) return;
final titledDirectories = await entry.getMetadataDirectories(context);
metadataNotifier.value = Map.fromEntries(titledDirectories);
_expandedDirectoryNotifier.value = null;