Exemplo n.º 1
0
        /// <summary>
        /// Removes the tag from the specified path.
        /// </summary>
        /// <param name="path">The path.</param>
        public static void Remove(string path)
        {
            Mpeg4Tag tag = new Mpeg4Tag();

            tag.Read(path);

            /*if (tag.m_udtapos == 0)
             * {
             *  Console.Write("no existing tags\n");
             * }*/

            using (FileStream outf = File.Open(path, FileMode.Open, FileAccess.Write, FileShare.None))
            {
                foreach (Atom atom in tag._atoms)
                {
                    if (string.Compare(atom.name, "udta", true) == 0)
                    {
                        outf.Seek(atom.pos + 4, SeekOrigin.Begin);
                        outf.Write(FREE_BYTES);
                    }
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Removes the tag from the specified path.
        /// </summary>
        /// <param name="path">The path.</param>
        public static void Remove(string path)
        {
            Mpeg4Tag tag = new Mpeg4Tag();
            tag.Read(path);

            /*if (tag.m_udtapos == 0)
            {
                Console.Write("no existing tags\n");
            }*/

            using (FileStream outf = File.Open(path, FileMode.Open, FileAccess.Write, FileShare.None))
            {
                foreach (Atom atom in tag._atoms)
                {
                    if (string.Compare(atom.name, "udta", true) == 0)
                    {
                        outf.Seek(atom.pos + 4, SeekOrigin.Begin);
                        outf.Write(FREE_BYTES);
                    }
                }
            }
        }