Bug 275784 - Unsupported MP4 non-string-type atoms are removed
Summary: Unsupported MP4 non-string-type atoms are removed
Status: RESOLVED FIXED
Alias: None
Product: taglib
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: 1.7
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Scott Wheeler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-16 06:07 UTC by Urs Fleisch
Modified: 2011-08-13 15:08 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Adds support for 8-, 16- and 64-bit uint type atoms in MP4 tags. (6.85 KB, patch)
2011-06-16 06:07 UTC, Urs Fleisch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Urs Fleisch 2011-06-16 06:07:35 UTC
Created attachment 61044 [details]
Adds support for 8-, 16- and 64-bit uint type atoms in MP4 tags.

Version:           1.7 (using Devel) 
OS:                Linux

When TagLib reads an MP4 tag, it recognizes some atoms which are not of UTF-8 string type, namely "trkn", "disk", "cpil", "pgap", "pcst", "tmpo", "gnre", "covr". Other atoms which are not of text type are silently discarded, this concerns the following atoms:

bool: "hdvd"
8-bit integer: "stik", "rtng", "akID"
32-bit integer: "tvsn", "tves", "cnID", "sfID", "atID", "geID"
64-bit integer: "plID"

The information about these atoms is from
http://code.google.com/p/mp4v2/wiki/iTunesMetadata


Reproducible: Always

Steps to Reproduce:
Take a file with Tags from iTunes and rewrite the MP4 tags using TagLib (e.g. with Kid3 from Ubuntu 11.04), then compare the two files:

$ diff -u <(mediainfo itunes10.m4a | sort) <(mediainfo taglib163.m4a | sort)
--- /dev/fd/63	2011-06-14 18:27:49.510306448 +0200
+++ /dev/fd/62	2011-06-14 18:27:49.510306448 +0200
@@ -13,7 +13,7 @@
 Codec ID                         : mp42
 Comment                          : Comments
 Compilation                      : Yes
-Complete name                    : itunes10.m4a
+Complete name                    : taglib163.m4a
 Composer                         : Composer
 Compression mode                 : Lossy
 Cover                            : Yes
@@ -54,7 +54,5 @@
 Track name/Position              : 1
 Track name/Total                 : 10
 tven                             : Episode ID
-tves                             : 654321
 tvsh                             : Show
-tvsn                             : 123456
 Writing application              : FAAC 1.24

You do not need iTunes to create an example file, you could also use mp4tags or AtomicParsley.

Actual Results:  
In the example file, the atoms tves and tvsn are removed. The happens with the other atoms listed in the detailed description.

Expected Results:  
All atoms (also tves and tves) should be still in the file.

I have attached a patch which fixes the problem.