You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now we just retain existing padding and add some if it's missing.
MP4: Utilize free atoms surrounding ilst atoms
Calculate space available before writing
When writing, all available space is taken into consideration. This includes allfree atoms before AND after the ilst, as well as the ilst itself. Any remaining space is converted back to padding.
This means if you save a 500 byte tag to the following file:
free (250 bytes)
ilst (250 bytes)
free (250 bytes)
The result will be:
ilst (500 bytes)
free (250 bytes)
Do not rewrite the entire file
We should be able to update the tag as above and its offsets without having to rewrite the entire file.
FLAC: Utilize PADDING blocks
We should be able to handle the cases:
No padding, write as normal and append to the end
Padding exists at the end, do not rewrite the file if it's enough
Still rewrite if the remaining padding is less than the preferred_padding
Padding exists between blocks, such as after VORBIS_COMMENTS and before a PICTURE
We should be able to grow the VORBIS_COMMENTS and leave PICTURE alone if possible. (?)
ID3v2: Simply overwrite tags
ID3v2 supports padding, so if tag_to_write.len() <= existing_tag.len(), we can simply write tag_to_write at the beginning of the file and replace any remaining size with padding.
This only applies to formats where ID3v2 can be written to the beginning of the file (not IFF formats)
The text was updated successfully, but these errors were encountered:
Right now we just retain existing padding and add some if it's missing.
free
atoms surroundingilst
atomsfree
atoms before AND after theilst
, as well as theilst
itself. Any remaining space is converted back to padding.free
(250 bytes)ilst
(250 bytes)free
(250 bytes)ilst
(500 bytes)free
(250 bytes)PADDING
blockspreferred_padding
VORBIS_COMMENTS
and before aPICTURE
VORBIS_COMMENTS
and leavePICTURE
alone if possible. (?)tag_to_write.len() <= existing_tag.len()
, we can simply writetag_to_write
at the beginning of the file and replace any remaining size with padding.The text was updated successfully, but these errors were encountered: