             // Tags used for PTS analysis
             var min_pts : Number = Number.POSITIVE_INFINITY;
             var max_pts : Number = Number.NEGATIVE_INFINITY;
-            var ptsTags : Vector.<Tag>;
-            if (_audioTags.length > 0) {
-                ptsTags = _audioTags;
+            if (_audio_tags_found) {
                 min_pts = _min_audio_pts;
                 max_pts = _max_audio_pts;
                 Log.debug("m/M audio PTS:" + min_pts + "/" + max_pts);
             }
 
-            if (_videoTags.length > 0) {
+            if (_video_tags_found) {
                 Log.debug("m/M video PTS:" + _min_video_pts + "/" + _max_video_pts);
-                if (_audioTags.length == 0) {
+                if (!_audio_tags_found) {
                     // no audio, video only stream
-                    ptsTags = _videoTags;
                     min_pts = _min_video_pts;
                     max_pts = _max_video_pts;
                 } else {

            var tag : Tag;
            // Audio PTS/DTS normalization + min/max computation
            for each (tag in audioTags) {
                tag.pts = PTS.normalize(_prev_audio_pts, tag.pts);
                tag.dts = PTS.normalize(_prev_audio_dts, tag.dts);
                _min_audio_pts = Math.min(_min_audio_pts, tag.pts);
                _max_audio_pts = Math.max(_max_audio_pts, tag.pts);
                _prev_audio_pts = tag.pts;
                _prev_audio_dts = tag.dts;
                _audioTags.push(tag);
            }

            // Video PTS/DTS normalization + min/max computation
            for each (tag in videoTags) {
                tag.pts = PTS.normalize(_prev_video_pts, tag.pts);
                tag.dts = PTS.normalize(_prev_video_dts, tag.dts);
                _min_video_pts = Math.min(_min_video_pts, tag.pts);
                _max_video_pts = Math.max(_max_video_pts, tag.pts);
                _prev_video_pts = tag.pts;
                _prev_video_dts = tag.dts;
                _videoTags.push(tag);
            }
        }


            // reset IO error, as if we reach this point, it means fragment has been successfully retrieved and demuxed
            _bIOError = false;

            if (!_audio_tags_found && !_video_tags_found) {
                hlsError = new HLSError(HLSError.FRAGMENT_PARSING_ERROR, _last_segment_url, "error parsing fragment, no tag found");
                _hls.dispatchEvent(new HLSEvent(HLSEvent.ERROR, hlsError));
            }
