 				return false;
 
 			// It's an I-frame if not a config record!
-			return tag.avcPacketType == 1;
+			return tag.avcPacketType == FLVTagVideo.AVC_PACKET_TYPE_NALU;
 		}
 
 		private function onBufferTag(tag:FLVTag):Boolean
 		{
-			//trace("Got tag " + tag);
-
 			var realTimestamp:int = wrapTagTimestampToFLVTimestamp(tag.timestamp);
+
+			//trace("Got tag " + tag + " @ " + realTimestamp);
 
 			// First, is it audio/video/other?
 			if(tag is FLVTagAudio)

			if(!tag)
				return false;

			// Must be keyframe.
			if(tag.frameType != FLVTagVideo.FRAME_TYPE_KEYFRAME)
				return false;

			// If config record, then it's an AVCC!
			return tag.avcPacketType == 0;
		}


		public static function isTagIFrame(tag:FLVTagVideo):Boolean
		{
			if(!tag)
				return false;

			// Must be keyframe.

				// Look for malformed tags.
				if(expectedSize != buffer.length)
				{
					CONFIG::LOGGING
					{
						logger.debug("SAW BAD PACKET, IGNORING?! Size mismatch: " + expectedSize + " != " + buffer.length);
					}
					continue;
				}

				var tagTimeSeconds:Number = wrapTagTimestampToFLVTimestamp(tag.timestamp) / 1000;

				// If it's more than 0.5 second jump ahead of current playhead, insert a RESET_SEEK so we won't stall forever.
				var tagDelta:Number = Math.abs(tagTimeSeconds - lastWrittenTime);

				if(tagDelta > (bufferFeedMin + bufferFeedAmount * 2) || isNaN(tagDelta))
				{
					// Don't do this for script tags, as they sometimes show up in weird orders.
					CONFIG::LOGGING
					{
						logger.debug("Inserting RESET_SEEK due to " + tagDelta + " being bigger than  " + (bufferFeedMin + bufferFeedAmount * 2));
					}
					appendBytesAction(NetStreamAppendBytesAction.RESET_SEEK);
				}

				lastWrittenTime = tagTimeSeconds;
