Make WordPress Core


Ignore:
Timestamp:
07/13/2013 12:37:36 AM (12 years ago)
Author:
nacin
Message:

ID3 1.9.7.

props wonderboymusic.
fixes #24737.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/ID3/module.audio-video.matroska.php

    r23766 r24696  
    217217    // public options
    218218    public static $hide_clusters    = true;  // if true, do not return information about CLUSTER chunks, since there's a lot of them and they're not usually useful [default: TRUE]
    219     public static $parse_whole_file = false; // true to parse the whole file, not only header [default: FALSE]
    220 
    221     // private parser settings/placeholders
    222     private $EBMLbuffer        = '';
    223     private $EBMLbuffer_offset = 0;
    224     private $EBMLbuffer_length = 0;
    225     private $current_offset    = 0;
    226     private $unuseful_elements = array(EBML_ID_CRC32, EBML_ID_VOID);
     219    public static $parse_whole_file = false; // true to parse the whole file, not only header [default: FALSE]
     220
     221    // private parser settings/placeholders
     222    private $EBMLbuffer        = '';
     223    private $EBMLbuffer_offset = 0;
     224    private $EBMLbuffer_length = 0;
     225    private $current_offset    = 0;
     226    private $unuseful_elements = array(EBML_ID_CRC32, EBML_ID_VOID);
    227227
    228228    public function Analyze()
     
    496496        }
    497497
    498         // determine mime type
     498        // determine mime type
    499499        if (!empty($info['video']['streams'])) {
    500500            $info['mime_type'] = ($info['matroska']['doctype'] == 'webm' ? 'video/webm' : 'video/x-matroska');
     
    508508    }
    509509
    510     private function parseEBML(&$info) {
     510    private function parseEBML(&$info) {
    511511        // http://www.matroska.org/technical/specs/index.html#EBMLBasics
    512512        $this->current_offset = $info['avdataoffset'];
     
    537537                                break;
    538538
    539                             case EBML_ID_CRC32: // not useful, ignore
    540                                 $this->current_offset = $element_data['end'];
    541                                 unset($element_data);
    542                                 break;
    543 
    544539                            default:
    545540                                $this->unhandledElement('header', __LINE__, $element_data);
    546541                        }
    547                         if (!empty($element_data)) {
    548                             unset($element_data['offset'], $element_data['end']);
    549                             $info['matroska']['header']['elements'][] = $element_data;
    550                         }
     542
     543                        unset($element_data['offset'], $element_data['end']);
     544                        $info['matroska']['header']['elements'][] = $element_data;
    551545                    }
    552546                    break;
     
    875869
    876870                                                    case EBML_ID_CUETRACKPOSITIONS:
    877                                                         $cuetrackpositions_entry = array();
     871                                                        $cuetrackpositions_entry = array();
    878872
    879873                                                        while ($this->getEBMLelement($sub_sub_subelement, $sub_subelement['end'], true)) {
     
    913907
    914908                            case EBML_ID_TAGS: // Element containing elements specific to Tracks/Chapters.
    915                                 $tags_entry = array();
     909                                $tags_entry = array();
    916910
    917911                                while ($this->getEBMLelement($subelement, $element_data['end'], false)) {
     
    12101204            }
    12111205        }
    1212     }
     1206    }
    12131207
    12141208    private function EnsureBufferHasEnoughData($min_data=1024) {
     
    13921386        $block_data['flags']['lacing_type'] = self::BlockLacingType($block_data['flags']['lacing']);
    13931387
    1394         // Lace (when lacing bit is set)
     1388        // Lace (when lacing bit is set)
    13951389        if ($block_data['flags']['lacing'] > 0) {
    13961390            $block_data['lace_frames'] = getid3_lib::BigEndian2Int($this->readEBMLelementData(1)) + 1; // Number of frames in the lace-1 (uint8)
Note: See TracChangeset for help on using the changeset viewer.