 				// Skip until we find our I-frame.
 				if(scanningForIFrame && !isIFrame)
 				{
-					if(isTagAVCC(vTag) == false)
-					{
-						CONFIG::LOGGING
-						{
-							logger.debug("   - SKIPPING non-I-FRAME");
-						}
-						
-						return true;
-					}
-					else
-					{
-						// Always pass AVCC info.
-						CONFIG::LOGGING
-						{
-							logger.debug("    - preserving AVCC during I-frame scan");
-						}
-					}
+					// Note latest AVCC for splicing.
+					if(isTagAVCC(vTag))
+						scanningForIFrame_avcc = vTag;
+
+					CONFIG::LOGGING
+					{
+						logger.debug("   - SKIPPING non-I-FRAME");
+					}
+					
+					return true;
 				}
 
 				if(scanningForIFrame && isIFrame)
 				{
 					CONFIG::LOGGING
 					{
-						logger.debug("   + GOT I-FRAME");
+						logger.debug("   + GOT I-FRAME @ " + realTimestamp);
 					}
 					
 					scanningForIFrame = false;
 
-					// Drop video frames until we get to before
-					// the timestamp of this I-frame. Then add
-					// this frame as normal.
+					// Make sure our tags are in order before splicing.
+					ensurePendingSorted();
+
+					// We want to splice our new video segment starting from the first i-frame
+					// onto the old buffered content. So we go into the pending tags list and 
+					// drop all the video tags that come after the I-frame we are inserting.
 					for(var i:int=pendingTags.length-1; i>=0 && pendingTags.length > 0; i--)
 					{
 						// Extra sanity since we are mutating the list.
 						if(i > pendingTags.length - 1)
 							i = pendingTags.length - 1;
 							
-						// Consider every video tag.
+						// Consider every video tag. Audio is handled elsewhere.
 						var potentialFilterTag:FLVTagVideo = pendingTags[i] as FLVTagVideo;
 						if(!potentialFilterTag)
 							continue;
 
-						if(isTagAVCC(potentialFilterTag))
-							continue;
-
-						// Stop scanning once we find tag before our tag.
-						if(wrapTagTimestampToFLVTimestamp(pendingTags[i].timestamp as int) <= wrapTagTimestampToFLVTimestamp(vTag.timestamp as int))
+						// Stop dropping frames once we find a video tag before the video tag we want to splice.
+						if(wrapTagTimestampToFLVTimestamp(potentialFilterTag.timestamp) < realTimestamp)
 							break;
 
 						// Remove this tag, update i.

					tag.write(bytes);
					_flvParserProcessed += bytes.length;

					if (isNaN(_initialTime))
					{
						trace("Setting new _initialTime of " + currentTime);
						_initialTime = currentTime;
					}

					//logger.debug("[1] APPEND BYTES tag.timestamp=" + tag.timestamp + " length=" + bytes.length);
					attemptAppendBytes(bytes);
					
					if (_playForDuration >= 0)

		private var bufferFeedMin:Number = 1.0; // How many seconds to actually keep fed into the native buffer.
		private var bufferFeedAmount:Number = 0.1; // How many seconds of data to feed when we feed.
		private var scanningForIFrame:Boolean = false; // When true, we are scanning video tags until we hit a keyframe/I-frame.
		private var scanningForIFrame_avcc:FLVTagVideo; // Holds the AVCC for the I-frame we are finding; used to splice stream.
		private var bufferParser:FLVParser = new FLVParser(false); // Used to parse incoming FLV stream to buffer. TODO: Refactor to be unnecessary.
		private var needPendingSort:Boolean = false; // Set when we detect a new tag that's not after the last one, to save on resorts.
		private var endAfterPending:Boolean = false;
