Skip to content

Commit d6c8a99

Browse files
committed
Tests: Fix TagLib TestMP4::testRemoveMetadata
1 parent 8718ccf commit d6c8a99

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lofty/tests/taglib/test_mp4.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -456,13 +456,16 @@ fn test_remove_metadata() {
456456
original_file.read_to_end(&mut original_file_bytes).unwrap();
457457
file.read_to_end(&mut new_file_bytes).unwrap();
458458

459-
// We need to do some editing, since we preserve the `udta` and `meta` atoms unlike TagLib
459+
// We need to do some editing, since we preserve the `meta` atom unlike TagLib
460460

461-
// Remove the `udta` atom, which should be 53 bytes in length
462-
new_file_bytes.splice(1505..1505 + 53, std::iter::empty());
461+
// Remove the `udta` atom, which should be 45 bytes in length
462+
new_file_bytes.splice(2785..2785 + 45, std::iter::empty());
463463

464464
// Fix the length of the `moov` atom
465-
new_file_bytes[1500] = 0;
465+
new_file_bytes[1500] = 8;
466+
467+
// Fix the length of the `udta` atom
468+
new_file_bytes[2780] = 8;
466469

467470
assert_eq!(original_file_bytes, new_file_bytes);
468471
}

0 commit comments

Comments
 (0)