From 07a5e6bd3cf21f69a41d06c8849b6be149c987d5 Mon Sep 17 00:00:00 2001 From: svollbehr Date: Sun, 21 Sep 2008 17:56:29 +0000 Subject: [PATCH] Fix small defects git-svn-id: http://php-reader.googlecode.com/svn/trunk@112 51a70ab9-7547-0410-9469-37e369ee0574 --- src/ISO14496/Box/TFHD.php | 10 +++++++--- src/ISO14496/Box/TRUN.php | 5 +++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/ISO14496/Box/TFHD.php b/src/ISO14496/Box/TFHD.php index 288dece..3126308 100644 --- a/src/ISO14496/Box/TFHD.php +++ b/src/ISO14496/Box/TFHD.php @@ -48,6 +48,7 @@ require_once("ISO14496/Box/Full.php"); * @package php-reader * @subpackage ISO 14496 * @author Sven Vollbehr + * @author Anders Ödlund * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Rev$ @@ -58,7 +59,10 @@ final class ISO14496_Box_TFHD extends ISO14496_Box_Full private $_trackId; /** @var integer */ - private $_defaultSampleDescriptionIndex; + private $_baseDataOffset; + + /** @var integer */ + private $_sampleDescriptionIndex; /** @var integer */ private $_defaultSampleDuration; @@ -95,7 +99,7 @@ final class ISO14496_Box_TFHD extends ISO14496_Box_Full const DEFAULT_SAMPLE_SIZE = 0x10; /** Indicates the precense of the defaultSampleFlags field. */ - const DEFAULT_SAMPLE_DURATION = 0x20; + const DEFAULT_SAMPLE_FLAGS = 0x20; /** * Indicates that the duration provided in either defaultSampleDuration, or by @@ -155,7 +159,7 @@ final class ISO14496_Box_TFHD extends ISO14496_Box_Full */ public function getSampleDescriptionIndex() { - return $this->_defaultSampleDescriptionIndex; + return $this->_sampleDescriptionIndex; } /** diff --git a/src/ISO14496/Box/TRUN.php b/src/ISO14496/Box/TRUN.php index c6fcc12..ced6c9c 100644 --- a/src/ISO14496/Box/TRUN.php +++ b/src/ISO14496/Box/TRUN.php @@ -47,6 +47,7 @@ require_once("ISO14496/Box/Full.php"); * @package php-reader * @subpackage ISO 14496 * @author Sven Vollbehr + * @author Anders Ödlund * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Rev$ @@ -120,7 +121,7 @@ final class ISO14496_Box_TRUN extends ISO14496_Box_Full $sample["size"] = $this->_reader->readUInt32BE(); if ($this->hasFlag(self::SAMPLE_FLAGS)) $sample["flags"] = $this->_reader->readUInt32BE(); - if ($this->hasFlag(self::SAMPLE_COMPOSITION_TIME_OFFSET)) + if ($this->hasFlag(self::SAMPLE_COMPOSITION_TIME_OFFSETS)) $sample["compositionTimeOffset"] = $this->_reader->readUInt32BE(); $this->_samples[] = $sample; $this->_flags = $flags; @@ -134,7 +135,7 @@ final class ISO14496_Box_TRUN extends ISO14496_Box_Full */ public function getDataOffset() { - return $this->_trackId; + return $this->_dataOffset; } /**