                 /* keyframe / accurate seeking, we need to filter out some FLV tags */
                 for each (flvData in tags) {
                     tag = flvData.tag;
+                    if (tag.type == FLVTag.AAC_HEADER) {
+                        aacHeaderfound = true;
+                    } else if (tag.type == FLVTag.AVC_HEADER) {
+                        avcHeaderfound = true;
+                    }
                     if (tag.pts >= first_pts) {
                         filteredTags.push(flvData);
                     } else {
                         switch(tag.type) {
                             case FLVTag.AAC_HEADER:
                             case FLVTag.AVC_HEADER:
-                            case FLVTag.METADATA:
                             case FLVTag.DISCONTINUITY:
                                 tag.pts = tag.dts = first_pts;
                                 filteredTags.push(flvData);
                                 break;
                             case FLVTag.AVC_NALU:
-                                /* only append video tags starting from last keyframe before seek position to avoid playback artifacts
+                            case FLVTag.METADATA:
+                                /* only append video and metadata tags starting from last keyframe before seek position to avoid playback artifacts
                                  *  rationale of this is that there can be multiple keyframes per segment. if we append all keyframes
                                  *  in NetStream, all of them will be displayed in a row and this will introduce some playback artifacts
                                  *  */

                var tagData : FLVData = new FLVData(tag, position, continuity);
                switch(tag.type) {
                    case FLVTag.AAC_HEADER:
                    case FLVTag.AAC_RAW:
                    case FLVTag.MP3_RAW:
                        _audioTags.push(tagData);
                        break;
                    case FLVTag.AVC_HEADER:
                    case FLVTag.AVC_NALU:
                        _videoTags.push(tagData);
                        break;

        private var _audioTags : Vector.<FLVData>;
        private var _videoTags : Vector.<FLVData>;
        private var _metaTags : Vector.<FLVData>;
        private var _aacHeader : FLVData;
        private var _avcHeader : FLVData;
        /** playlist duration **/
        private var _playlist_duration : Number = 0;
        /** requested start position **/
