                         pts_max_audio = Math.max(pts_max_audio, tag.pts);
                         break;
                     case FLVTag.AVC_HEADER:
+                        if (isNaN(pts_min_video_header)) {
+                            pts_min_video_header = tag.pts;
+                        }
                     case FLVTag.AVC_NALU:
                         video_found = true;
                         tags_video_found = true;

            this.valid = true;
            this.video_width = 0;
            this.video_height = 0;
        };

        public function appendTags(tags : Vector.<FLVTag>) : void {

                        tags_pts_max_video = Math.max(tags_pts_max_video, tag.pts);
                        pts_min_video = Math.min(pts_min_video, tag.pts);
                        pts_max_video = Math.max(pts_max_video, tag.pts);
                        starts_with_idr = !isNaN(pts_min_video_header) && pts_min_video_header <= tag.pts;
                        break;
                    case FLVTag.DISCONTINUITY:
                    case FLVTag.METADATA:
