                 /* 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
                                  *  */

                Log.debug("seek : requested position:" + position + ",seek position:" + _seek_position_requested);
            }
            // check if we can seek in buffer
            // if (_seek_position_requested >= min_pos && _seek_position_requested <= max_pos) {
            // _seek_pos_reached = false;
            // _first_start_position = min_pos;
            // } else {
            // seek position is out of buffer : load from fragment
            _fragmentLoader.stop();
            _fragmentLoader.seek(position);
            flushAll();
            // }
            _timer.start();
        }


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