ogg: support comment header packets spanning pages (#57)

* ogg: support comment header packets spanning pages

* ogg: add test for multipage comment header

* ogg: cleaner buffer initialization

Co-Authored-By: David Howden <dhowden@gmail.com>
This commit is contained in:
w1ck3dg0ph3r
2019-11-22 22:23:40 +11:00
committed by David Howden
co-authored by David Howden
parent f644c14784
commit 73beae5008
3 changed files with 89 additions and 40 deletions
+15 -14
View File
@@ -54,20 +54,21 @@ var mp3id3v11Metadata = testMetadata{
func TestReadFrom(t *testing.T) {
testdata := map[string]testMetadata{
"with_tags/sample.flac": fullMetadata,
"with_tags/sample.id3v11.mp3": mp3id3v11Metadata,
"with_tags/sample.id3v22.mp3": fullMetadata,
"with_tags/sample.id3v23.mp3": fullMetadata,
"with_tags/sample.id3v24.mp3": fullMetadata,
"with_tags/sample.m4a": fullMetadata,
"with_tags/sample.mp4": fullMetadata,
"with_tags/sample.ogg": fullMetadata,
"with_tags/sample.dsf": fullMetadata,
"without_tags/sample.flac": emptyMetadata,
"without_tags/sample.m4a": emptyMetadata,
"without_tags/sample.mp3": emptyMetadata,
"without_tags/sample.mp4": emptyMetadata,
"without_tags/sample.ogg": emptyMetadata,
"with_tags/sample.flac": fullMetadata,
"with_tags/sample.id3v11.mp3": mp3id3v11Metadata,
"with_tags/sample.id3v22.mp3": fullMetadata,
"with_tags/sample.id3v23.mp3": fullMetadata,
"with_tags/sample.id3v24.mp3": fullMetadata,
"with_tags/sample.m4a": fullMetadata,
"with_tags/sample.mp4": fullMetadata,
"with_tags/sample.ogg": fullMetadata,
"with_tags/sample.multipage.ogg": fullMetadata,
"with_tags/sample.dsf": fullMetadata,
"without_tags/sample.flac": emptyMetadata,
"without_tags/sample.m4a": emptyMetadata,
"without_tags/sample.mp3": emptyMetadata,
"without_tags/sample.mp4": emptyMetadata,
"without_tags/sample.ogg": emptyMetadata,
}
for path, metadata := range testdata {