]>
Commit | Line | Data |
---|---|---|
c1853b94 MB |
1 | Index: src/TagLib/Mpeg/AudioHeader.cs |
2 | =================================================================== | |
3 | --- src/TagLib/Mpeg/AudioHeader.cs (revision 94327) | |
4 | +++ src/TagLib/Mpeg/AudioHeader.cs (revision 94328) | |
5 | @@ -252,7 +252,13 @@ | |
6 | throw new CorruptFileException ( | |
7 | "First byte did not match MPEG synch."); | |
8 | ||
9 | - if (data [1] < 0xE0) | |
10 | + // Checking bits from high to low: | |
11 | + // | |
12 | + // First 3 bits MUST be set. Bits 4 and 5 can | |
13 | + // be 00, 10, or 11 but not 01. One or more of | |
14 | + // bits 6 and 7 must be set. Bit 8 can be | |
15 | + // anything. | |
16 | + if ((data [1] & 0xE6) <= 0xE0 || (data [1] & 0x18) == 0x08) | |
17 | throw new CorruptFileException ( | |
18 | "Second byte did not match MPEG synch."); | |
19 | ||
20 | Index: src/TagLib/Ape/File.cs | |
21 | =================================================================== | |
22 | --- src/TagLib/Ape/File.cs (revision 117109) | |
23 | +++ src/TagLib/Ape/File.cs (working copy) | |
24 | @@ -40,6 +40,8 @@ | |
25 | /// </remarks> | |
26 | [SupportedMimeType("taglib/ape", "ape")] | |
27 | [SupportedMimeType("audio/x-ape")] | |
28 | + [SupportedMimeType("audio/ape")] | |
29 | + [SupportedMimeType("application/x-ape")] | |
30 | public class File : TagLib.NonContainer.File | |
31 | { | |
32 | #region Private Fields | |
33 | @@ -275,4 +277,4 @@ | |
34 | ||
35 | #endregion | |
36 | } | |
37 | -} | |
38 | \ No newline at end of file | |
39 | +} | |
40 | Index: src/TagLib/Asf/File.cs | |
41 | =================================================================== | |
42 | --- src/TagLib/Asf/File.cs (revision 117109) | |
43 | +++ src/TagLib/Asf/File.cs (working copy) | |
44 | @@ -33,6 +33,7 @@ | |
45 | [SupportedMimeType("taglib/wmv", "wmv")] | |
46 | [SupportedMimeType("taglib/asf", "asf")] | |
47 | [SupportedMimeType("audio/x-ms-wma")] | |
48 | + [SupportedMimeType("audio/x-ms-asf")] | |
49 | [SupportedMimeType("video/x-ms-asf")] | |
50 | public class File : TagLib.File | |
51 | { | |
52 | Index: src/TagLib/Ogg/File.cs | |
53 | =================================================================== | |
54 | --- src/TagLib/Ogg/File.cs (revision 117109) | |
55 | +++ src/TagLib/Ogg/File.cs (working copy) | |
56 | @@ -35,6 +35,8 @@ | |
57 | /// and properties support for Ogg files. | |
58 | /// </summary> | |
59 | [SupportedMimeType("taglib/ogg", "ogg")] | |
60 | + [SupportedMimeType("taglib/oga", "oga")] | |
61 | + [SupportedMimeType("taglib/ogv", "ogv")] | |
62 | [SupportedMimeType("application/ogg")] | |
63 | [SupportedMimeType("application/x-ogg")] | |
64 | [SupportedMimeType("audio/vorbis")] | |
65 | @@ -42,6 +44,10 @@ | |
66 | [SupportedMimeType("audio/x-vorbis+ogg")] | |
67 | [SupportedMimeType("audio/ogg")] | |
68 | [SupportedMimeType("audio/x-ogg")] | |
69 | + [SupportedMimeType("video/ogg")] | |
70 | + [SupportedMimeType("video/x-ogm+ogg")] | |
71 | + [SupportedMimeType("video/x-theora+ogg")] | |
72 | + [SupportedMimeType("video/x-theora")] | |
73 | public class File : TagLib.File | |
74 | { | |
75 | #region Private Fields | |
76 | Index: examples/ReadFromUri.cs | |
77 | =================================================================== | |
78 | --- examples/ReadFromUri.cs (revision 117109) | |
79 | +++ examples/ReadFromUri.cs (working copy) | |
80 | @@ -114,7 +114,11 @@ | |
81 | ||
82 | Console.WriteLine ("Total running time: " + (end - start)); | |
83 | Console.WriteLine ("Total files read: " + songs_read); | |
84 | - Console.WriteLine ("Average time per file: " + new TimeSpan ((end - start).Ticks / songs_read)); | |
85 | + | |
86 | + if (songs_read > 0) | |
87 | + { | |
88 | + Console.WriteLine ("Average time per file: " + new TimeSpan ((end - start).Ticks / songs_read)); | |
89 | + } | |
90 | } | |
91 | } | |
92 |