                 // modify PTS for DISCONTINUITY/METADATA/AAC_HEADER/AVC_HEADER tag
                 // and push as filtered tag
                 if(disIdx >=0) {
-                    tags[disIdx].pts = tags[disIdx].dts = Math.min(tags[audioIdx].dts,tags[videoIdx].dts);
+                    tags[disIdx].pts = tags[disIdx].dts = Math.min(audio_dts,video_dts);
                     filteredTags.push(tags[disIdx]);
                 }
+
                 if(metIdx >=0) {
-                    tags[metIdx].pts = tags[metIdx].dts = Math.min(tags[audioIdx].dts,tags[videoIdx].dts);
+                    tags[metIdx].pts = tags[metIdx].dts = Math.min(audio_dts,video_dts);
                     filteredTags.push(tags[metIdx]);
                 }
                 if(aacIdx >=0) {
-                    tags[aacIdx].pts = tags[aacIdx].dts = tags[audioIdx].dts;
+                    tags[aacIdx].pts = tags[aacIdx].dts = audio_dts;
                     filteredTags.push(tags[aacIdx]);
                 }
                 if(avcIdx >=0) {
-                    tags[avcIdx].pts = tags[avcIdx].dts = tags[videoIdx].dts;
+                    tags[avcIdx].pts = tags[avcIdx].dts = video_dts;
                     filteredTags.push(tags[avcIdx]);
                 }
 

        private function filterOverlappingTags(tags : Vector.<FLVTag>, overlap : Number) : Vector.<FLVTag> {
            var aacIdx : int,avcIdx : int,disIdx : int,metIdx : int, videoIdx : int,audioIdx : int, lastIdx : int;
            var first_pts : Number = tags[0].pts + 1000*overlap;
            var flvData : FLVData = getNextTag(false);
            if(flvData) {
                first_pts = Math.max(first_pts,flvData.tag.pts);

                        // retrieve first keyframe after first_pts
                        if (videoIdx == -1 && tag.pts > first_pts && tag.keyframe) {
                            lastIdx = videoIdx = i;
                            video_dts = tag.dts;
                            CONFIG::LOGGING {
                                Log.debug("found AVC_NALU_K after overlap @PTS:" + tag.pts);
                            }
