(bug 31944). As a work around for bug 31944, don't extract tiff:YCbCrSubSampling...
authorBrian Wolff <bawolff@users.mediawiki.org>
Thu, 3 Nov 2011 13:10:14 +0000 (13:10 +0000)
committerBrian Wolff <bawolff@users.mediawiki.org>
Thu, 3 Nov 2011 13:10:14 +0000 (13:10 +0000)
Several files have wrong type for that property, XMPReader currently marks entire file as invalid instead of just specific property, if there is a type mismatch in XMP data.

includes/media/XMPInfo.php

index 1d580ff..156d9b5 100644 (file)
@@ -631,12 +631,23 @@ class XMPInfo {
                                'validate'  => 'validateClosed',
                                'choices'   => array( '1' => true, '2' => true ),
                        ),
-                       'YCbCrSubSampling'  => array(
-                               'map_group' => 'exif',
-                               'mode'      => XMPReader::MODE_SEQ,
-                               'validate'  => 'validateClosed',
-                               'choices'   => array( '1' => true, '2' => true ),
-                       ),
+                       /********
+                        * Disable extracting this property (bug 31944)
+                        * Several files have a string instead of a Seq
+                        * for this property. XMPReader doesn't handle
+                        * mismatched types very gracefully (it marks
+                        * the entire file as invalid, instead of just
+                        * the relavent prop). Since this prop
+                        * doesn't communicate all that useful information
+                        * just disable this prop for now, until such
+                        * XMPReader is more graceful (bug 32172)
+                        * 'YCbCrSubSampling'  => array(
+                        *      'map_group' => 'exif',
+                        *      'mode'      => XMPReader::MODE_SEQ,
+                        *      'validate'  => 'validateClosed',
+                        *      'choices'   => array( '1' => true, '2' => true ),
+                        * ),
+                        */ 
                ),
                'http://ns.adobe.com/exif/1.0/aux/' => array(
                        'Lens'              => array(