                 _dataVector = new Vector.<ByteArray>();
                 _data_complete = false;
                 _read_position = 0;
+                _totalBytes = 0;
+                _dataOffset = 0;
                 _avcc = null;
                 _timer.addEventListener(TimerEvent.TIMER, _parseTimer);
             }
             _dataVector.push(data);
+            _totalBytes += data.length;
             _timer.start();
         }
 

            // dont spend more than 20ms demuxing TS packets to avoid loosing frames
            while(data  != null && ((getTimer() - start_time) < 20)) {
                _parseTSPacket(data);
                _read_position+=188;
                if(data.bytesAvailable < 188) {
                    data = getNextTSBuffer(_read_position);
                }
            }

        /* last AVCC byte Array */
        private var _avcc : ByteArray;
        private var _timer : Timer;
        private var _totalBytes : uint;

        public static function probe(data : ByteArray) : Boolean {
            var pos : uint = data.position;
            var len : uint = Math.min(data.bytesAvailable, PACKETSIZE * 2);
            for (var i : int = 0; i < len; i++) {
                if (data.readByte() == SYNCBYTE) {
                    // ensure that at least two consecutive TS start offset are found
                    if (data.bytesAvailable > PACKETSIZE) {
                        data.position = pos + i + PACKETSIZE;
                        if (data.readByte() == SYNCBYTE) {
                            data.position = pos + i;
                            return true;
