 
         private function get max_audio_pos() : Number {
             var max_pos_ : Number = Number.NEGATIVE_INFINITY;
-            if (_audioTags.length) max_pos_ = Math.max(max_pos_, _audioTags[_audioTags.length - 1].position - (_time_sliding - _audioTags[_audioTags.length - 1].sliding ));
+            if (_audioTags.length) max_pos_ = Math.max(max_pos_, _audioTags[_audioTags.length - 1].position_absolute - _time_sliding );
             return max_pos_;
         }
 
         private function get max_video_pos() : Number {
             var max_pos_ : Number = Number.NEGATIVE_INFINITY;
-            if (_videoTags.length) max_pos_ = Math.max(max_pos_, _videoTags[_videoTags.length - 1].position - (_time_sliding - _videoTags[_videoTags.length - 1].sliding ));
+            if (_videoTags.length) max_pos_ = Math.max(max_pos_, _videoTags[_videoTags.length - 1].position_absolute - _time_sliding );
             return max_pos_;
         }
 

            // loop through all tags and find index position of header tags located before start position
            for (var i : int = 0; i < tags.length; i++) {
                var data : FLVData = tags[i];
                if (data.position - (_time_sliding - data.sliding) <= start_position) {
                    lastIdx = i;
                    // current tag is before requested start position
                    // grab AVC/AAC/DISCONTINUITY/KEYFRAMES tag located just before

        this.sliding = sliding;
        this.continuity = continuity;
    }

    public function get position_absolute() : Number {
        return (this.position + this.sliding);
    }
}

class BufferPTS {
