mirror of
https://github.com/wader/fq.git
synced 2024-12-23 05:13:30 +03:00
vorbis_comment: Fix field name typo
This commit is contained in:
parent
1c3c65b191
commit
f9622c2dc7
2
format/flac/testdata/mono24.fqtest
vendored
2
format/flac/testdata/mono24.fqtest
vendored
@ -41,7 +41,7 @@ $ fq -d flac verbose /mono24.flac
|
||||
| | | user_comments: [1] 0x6c-0x97.7 (44)
|
||||
| | | [0]: user_comment {} 0x6c-0x97.7 (44)
|
||||
0x0060| 28 00 00 00| (...| length: 40 0x6c-0x6f.7 (4)
|
||||
0x0070|57 41 56 45 46 4f 52 4d 41 54 45 58 54 45 4e 53|WAVEFORMATEXTENS| vendor: "WAVEFORMATEXTENSIBLE_CHANNEL_MASK=0x0004" 0x70-0x97.7 (40)
|
||||
0x0070|57 41 56 45 46 4f 52 4d 41 54 45 58 54 45 4e 53|WAVEFORMATEXTENS| comment: "WAVEFORMATEXTENSIBLE_CHANNEL_MASK=0x0004" 0x70-0x97.7 (40)
|
||||
* |until 0x97.7 (40) | |
|
||||
| | | [3]: metadatablock {} 0x98-0x209b.7 (8196)
|
||||
0x0090| 81 | . | last_block: true 0x98-0x98 (0.1)
|
||||
|
12
format/flac/testdata/picture_seek_gain.fqtest
vendored
12
format/flac/testdata/picture_seek_gain.fqtest
vendored
@ -40,32 +40,32 @@ $ fq -d flac verbose /picture_seek_gain.flac
|
||||
| | | user_comments: [6] 0x59-0x12e.7 (214)
|
||||
| | | [0]: user_comment {} 0x59-0x71.7 (25)
|
||||
0x0050| 15 00 00 00 | .... | length: 21 0x59-0x5c.7 (4)
|
||||
0x0050| 65 6e 63| enc| vendor: "encoder=Lavf58.45.100" 0x5d-0x71.7 (21)
|
||||
0x0050| 65 6e 63| enc| comment: "encoder=Lavf58.45.100" 0x5d-0x71.7 (21)
|
||||
0x0060|6f 64 65 72 3d 4c 61 76 66 35 38 2e 34 35 2e 31|oder=Lavf58.45.1|
|
||||
0x0070|30 30 |00 |
|
||||
| | | [1]: user_comment {} 0x72-0x9a.7 (41)
|
||||
0x0070| 25 00 00 00 | %... | length: 37 0x72-0x75.7 (4)
|
||||
0x0070| 52 45 50 4c 41 59 47 41 49 4e| REPLAYGAIN| vendor: "REPLAYGAIN_REFERENCE_LOUDNESS=89.0 dB" 0x76-0x9a.7 (37)
|
||||
0x0070| 52 45 50 4c 41 59 47 41 49 4e| REPLAYGAIN| comment: "REPLAYGAIN_REFERENCE_LOUDNESS=89.0 dB" 0x76-0x9a.7 (37)
|
||||
0x0080|5f 52 45 46 45 52 45 4e 43 45 5f 4c 4f 55 44 4e|_REFERENCE_LOUDN|
|
||||
0x0090|45 53 53 3d 38 39 2e 30 20 64 42 |ESS=89.0 dB |
|
||||
| | | [2]: user_comment {} 0x9b-0xc0.7 (38)
|
||||
0x0090| 22 00 00 00 | "... | length: 34 0x9b-0x9e.7 (4)
|
||||
0x0090| 52| R| vendor: "REPLAYGAIN_TRACK_GAIN=-24601.00 dB" 0x9f-0xc0.7 (34)
|
||||
0x0090| 52| R| comment: "REPLAYGAIN_TRACK_GAIN=-24601.00 dB" 0x9f-0xc0.7 (34)
|
||||
0x00a0|45 50 4c 41 59 47 41 49 4e 5f 54 52 41 43 4b 5f|EPLAYGAIN_TRACK_|
|
||||
* |until 0xc0.7 (34) | |
|
||||
| | | [3]: user_comment {} 0xc1-0xe4.7 (36)
|
||||
0x00c0| 20 00 00 00 | ... | length: 32 0xc1-0xc4.7 (4)
|
||||
0x00c0| 52 45 50 4c 41 59 47 41 49 4e 5f| REPLAYGAIN_| vendor: "REPLAYGAIN_TRACK_PEAK=0.12496948" 0xc5-0xe4.7 (32)
|
||||
0x00c0| 52 45 50 4c 41 59 47 41 49 4e 5f| REPLAYGAIN_| comment: "REPLAYGAIN_TRACK_PEAK=0.12496948" 0xc5-0xe4.7 (32)
|
||||
0x00d0|54 52 41 43 4b 5f 50 45 41 4b 3d 30 2e 31 32 34|TRACK_PEAK=0.124|
|
||||
0x00e0|39 36 39 34 38 |96948 |
|
||||
| | | [4]: user_comment {} 0xe5-0x10a.7 (38)
|
||||
0x00e0| 22 00 00 00 | "... | length: 34 0xe5-0xe8.7 (4)
|
||||
0x00e0| 52 45 50 4c 41 59 47| REPLAYG| vendor: "REPLAYGAIN_ALBUM_GAIN=-24601.00 dB" 0xe9-0x10a.7 (34)
|
||||
0x00e0| 52 45 50 4c 41 59 47| REPLAYG| comment: "REPLAYGAIN_ALBUM_GAIN=-24601.00 dB" 0xe9-0x10a.7 (34)
|
||||
0x00f0|41 49 4e 5f 41 4c 42 55 4d 5f 47 41 49 4e 3d 2d|AIN_ALBUM_GAIN=-|
|
||||
0x0100|32 34 36 30 31 2e 30 30 20 64 42 |24601.00 dB |
|
||||
| | | [5]: user_comment {} 0x10b-0x12e.7 (36)
|
||||
0x0100| 20 00 00 00 | ... | length: 32 0x10b-0x10e.7 (4)
|
||||
0x0100| 52| R| vendor: "REPLAYGAIN_ALBUM_PEAK=0.12496948" 0x10f-0x12e.7 (32)
|
||||
0x0100| 52| R| comment: "REPLAYGAIN_ALBUM_PEAK=0.12496948" 0x10f-0x12e.7 (32)
|
||||
0x0110|45 50 4c 41 59 47 41 49 4e 5f 41 4c 42 55 4d 5f|EPLAYGAIN_ALBUM_|
|
||||
0x0120|50 45 41 4b 3d 30 2e 31 32 34 39 36 39 34 38 |PEAK=0.12496948 |
|
||||
| | | [3]: metadatablock {} 0x12f-0x25e.7 (304)
|
||||
|
2
format/flac/testdata/stereo24.fqtest
vendored
2
format/flac/testdata/stereo24.fqtest
vendored
@ -41,7 +41,7 @@ $ fq -d flac verbose /stereo24.flac
|
||||
| | | user_comments: [1] 0x6c-0x97.7 (44)
|
||||
| | | [0]: user_comment {} 0x6c-0x97.7 (44)
|
||||
0x00060| 28 00 00 00| (...| length: 40 0x6c-0x6f.7 (4)
|
||||
0x00070|57 41 56 45 46 4f 52 4d 41 54 45 58 54 45 4e 53|WAVEFORMATEXTENS| vendor: "WAVEFORMATEXTENSIBLE_CHANNEL_MASK=0x0003" 0x70-0x97.7 (40)
|
||||
0x00070|57 41 56 45 46 4f 52 4d 41 54 45 58 54 45 4e 53|WAVEFORMATEXTENS| comment: "WAVEFORMATEXTENSIBLE_CHANNEL_MASK=0x0003" 0x70-0x97.7 (40)
|
||||
* |until 0x97.7 (40) | |
|
||||
| | | [3]: metadatablock {} 0x98-0x209b.7 (8196)
|
||||
0x00090| 81 | . | last_block: true 0x98-0x98 (0.1)
|
||||
|
2
format/ogg/testdata/test.fqtest
vendored
2
format/ogg/testdata/test.fqtest
vendored
@ -151,7 +151,7 @@ $ fq -d ogg verbose /test.ogg
|
||||
| | | user_comments: [1] 0x1c-0x3e.7 (35)
|
||||
| | | [0]: user_comment {} 0x1c-0x3e.7 (35)
|
||||
0x010| 1f 00 00 00| ....| length: 31 0x1c-0x1f.7 (4)
|
||||
0x020|65 6e 63 6f 64 65 72 3d 4c 61 76 63 35 38 2e 39|encoder=Lavc58.9| vendor: "encoder=Lavc58.91.100 libvorbis" 0x20-0x3e.7 (31)
|
||||
0x020|65 6e 63 6f 64 65 72 3d 4c 61 76 63 35 38 2e 39|encoder=Lavc58.9| comment: "encoder=Lavc58.91.100 libvorbis" 0x20-0x3e.7 (31)
|
||||
0x030|31 2e 31 30 30 20 6c 69 62 76 6f 72 62 69 73 |1.100 libvorbis |
|
||||
0x030| 01| .| padding0: Correct (none) (zero padding) 0x3f-0x3f.6 (0.7)
|
||||
0x030| 01| .| frame_bit: Correct (0x1) 0x3f.7-0x3f.7 (0.1)
|
||||
|
4
format/opus/testdata/opus.fqtest
vendored
4
format/opus/testdata/opus.fqtest
vendored
@ -43,9 +43,9 @@ $ fq -d opus_packet verbose /opus-tags
|
||||
| | | [0]: user_comment {} 0x1d-0x3d.7 (33)
|
||||
0x10| 1d 00 00| ...| length: 29 0x1d-0x20.7 (4)
|
||||
0x20|00 |. |
|
||||
0x20| 65 6e 63 6f 64 65 72 3d 4c 61 76 63 35 38 2e| encoder=Lavc58.| vendor: "encoder=Lavc58.91.100 libopus" 0x21-0x3d.7 (29)
|
||||
0x20| 65 6e 63 6f 64 65 72 3d 4c 61 76 63 35 38 2e| encoder=Lavc58.| comment: "encoder=Lavc58.91.100 libopus" 0x21-0x3d.7 (29)
|
||||
0x30|39 31 2e 31 30 30 20 6c 69 62 6f 70 75 73 |91.100 libopus |
|
||||
| | | [1]: user_comment {} 0x3e-0x4b.7 (14)
|
||||
0x30| 0a 00| ..| length: 10 0x3e-0x41.7 (4)
|
||||
0x40|00 00 |.. |
|
||||
0x40| 61 72 74 69 73 74 3d 62 6c 61| | artist=bla| | vendor: "artist=bla" 0x42-0x4b.7 (10)
|
||||
0x40| 61 72 74 69 73 74 3d 62 6c 61| | artist=bla| | comment: "artist=bla" 0x42-0x4b.7 (10)
|
||||
|
2
format/vorbis/testdata/vorbis.fqtest
vendored
2
format/vorbis/testdata/vorbis.fqtest
vendored
@ -28,7 +28,7 @@ $ fq -d vorbis_packet verbose /vorbis-comment
|
||||
| | | user_comments: [1] 0x1c-0x3e.7 (35)
|
||||
| | | [0]: user_comment {} 0x1c-0x3e.7 (35)
|
||||
0x10| 1f 00 00 00| ....| length: 31 0x1c-0x1f.7 (4)
|
||||
0x20|65 6e 63 6f 64 65 72 3d 4c 61 76 63 35 38 2e 35|encoder=Lavc58.5| vendor: "encoder=Lavc58.54.100 libvorbis" 0x20-0x3e.7 (31)
|
||||
0x20|65 6e 63 6f 64 65 72 3d 4c 61 76 63 35 38 2e 35|encoder=Lavc58.5| comment: "encoder=Lavc58.54.100 libvorbis" 0x20-0x3e.7 (31)
|
||||
0x30|34 2e 31 30 30 20 6c 69 62 76 6f 72 62 69 73 |4.100 libvorbis |
|
||||
0x30| 01| .| padding0: Correct (none) (zero padding) 0x3f-0x3f.6 (0.7)
|
||||
0x30| 01| .| frame_bit: Correct (0x1) 0x3f.7-0x3f.7 (0.1)
|
||||
|
@ -30,7 +30,7 @@ func commentDecode(d *decode.D, in interface{}) interface{} {
|
||||
i := uint64(0)
|
||||
d.FieldStructArrayLoopFn("user_comments", "user_comment", func() bool { return i < userCommentListLength }, func(d *decode.D) {
|
||||
userCommentLength := d.FieldU32LE("length")
|
||||
userComment := d.FieldUTF8("vendor", int(userCommentLength))
|
||||
userComment := d.FieldUTF8("comment", int(userCommentLength))
|
||||
pairParts := strings.SplitN(userComment, "=", 2)
|
||||
if len(pairParts) == 2 {
|
||||
k, v := strings.ToUpper(pairParts[0]), pairParts[1]
|
||||
|
Loading…
Reference in New Issue
Block a user