Esempio n. 1
0
        public static long OffsetToMpegHeader(FileInfo file)
        {
            long tagSize = TagUtils.TagSizeV2(file);

            using (Stream s = VirtualDrive.OpenInStream(file.FullName))
            {
                s.Seek(tagSize, SeekOrigin.Begin);
                return(tagSize + TagUtils.OffsetToFirstMpegHeader(s));
            }
        }
Esempio n. 2
0
        public static long OffsetTagToMpegHeader(FileInfo file)
        {
            long tagSize = TagUtils.TagSizeV2(file);

            using (Stream s = VirtualDrive.OpenInStream(file.FullName))
            {
                s.Seek(tagSize, SeekOrigin.Begin);

                long offset = TagUtils.OffsetToFirstMpegHeader(s);

                if (offset > 0)
                {
                    Logger.WriteLine(Tokens.Warning, "Tag V2 has wrong size. Offset to MPEG header: " + offset
                                     + " in file " + file.FullName);
                }

                return(offset);
            }
        }