Skip to content

Commit

Permalink
Ensure the result of GpsLocation is consistant when running the regre…
Browse files Browse the repository at this point in the history
…ssion tests in metadata-extractor-images for both mov and mp4 files.
  • Loading branch information
stefanlenselink committed Apr 5, 2024
1 parent ed79cc0 commit 101014d
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions MetadataExtractor/Formats/QuickTime/QuickTimeMetadataReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,26 @@ void UuidHandler(AtomCallbackArgs a)

void UserDataHandler(AtomCallbackArgs a)
{
switch (a.TypeString)
var key = a.TypeString;
if (key.Length < 1)
{
return;
}
if (key[0] == 0xa9 || key[0] == 0x40)
{
//Tag ID's beginning with the copyright symbol (hex 0xa9) are multi-language text
//Alternate language tags are accessed by adding a dash followed by a 3-character ISO 639-2 language code to the tag name.

//some stupid Ricoh programmer used the '@' symbol instead of the copyright symbol in these tag ID's for the Ricoh Theta Z1 and maybe other models

//For now we don't support those, we will strip the copyright and locale info
key = key.Substring(1);
key = key.Split('-')[0];
}

switch (key)
{
case "?xyz":
case "xyz":
var stringSize = a.Reader.GetUInt16();
a.Reader.Skip(2); // uint16 language code
var stringBytes = a.Reader.GetBytes(stringSize);
Expand Down

0 comments on commit 101014d

Please sign in to comment.