         /* 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, 188 * 2);
+            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 > 188) {
-                        data.position = pos + i + 188;
+                    if (data.bytesAvailable > PACKETSIZE) {
+                        data.position = pos + i + PACKETSIZE;
                         if (data.readByte() == SYNCBYTE) {
                             data.position = pos + i;
                             return true;

        }

        private function getNextTSBuffer(start : int) : ByteArray {
            // find element matching with start offset
            for(var i : int = 0, offset : int = 0; i < _dataVector.length; i++) {
                var buffer : ByteArray = _dataVector[i], bufferLength : int = buffer.length;
                if(start >= offset && start <= offset + bufferLength) {
                    buffer.position = start - offset;
                    if(buffer.bytesAvailable >= 188) {
                        return buffer;
                    } else {
                        // TS packet overlapping between 2 buffers
                        if((i+1) < _dataVector.length) {
                            var ba : ByteArray = new ByteArray();
                            ba.writeBytes(buffer, buffer.position);
                            buffer = _dataVector[i+1];
                            buffer.position = 0;
                            if(buffer.bytesAvailable + ba.length >=188) {
                                ba.writeBytes(buffer,0,188-ba.position);
                                ba.position = 0;
                                return ba;
                            }
                        }
                        // if TS overlapping but next buffer not available or next buffer not full enough, return null
                        return null;
                    }
                }
                offset += bufferLength;
            }
            return null;
        }

        private var _tags : Vector.<FLVTag>;
        /* Vector of buffer */
        private var _dataVector : Vector.<ByteArray>;
        private var _dataOffset : uint;
        /* callback functions for audio selection, and parsing progress/complete */
        private var _callback_audioselect : Function;
        private var _callback_progress : Function;
