ref: 7c2d54efdb12c03309522f48e2dc195e0b85d3e2
parent: 9052d1ff6bad37f28a58e19763104aa93ad45298
author: menno <menno>
date: Tue Feb 25 07:03:52 EST 2003
Fix in tag writing of strings > 128 characters
--- a/common/mp4v2/mp4file.cpp
+++ b/common/mp4v2/mp4file.cpp
@@ -2376,13 +2376,33 @@
(MP4Property**)&pNameProperty);
ASSERT(pNameProperty);
+ {
+ char name2[128];
+ if (strlen(name) > 126)
+ {
+ memcpy(name2, name, 127);
+ name2[127] = '\0';
+ pNameProperty->AddValue((char*)name2);
+ } else {
pNameProperty->AddValue((char*)name);
+ }
+ }
pTagAtom->FindProperty("TAG4.entries.value",
(MP4Property**)&pValueProperty);
ASSERT(pValueProperty);
+ {
+ char value2[128];
+ if (strlen(value) > 126)
+ {
+ memcpy(value2, value, 127);
+ value2[127] = '\0';
+ pValueProperty->AddValue((char*)value2);
+ } else {
pValueProperty->AddValue((char*)value);
+ }
+ }
pCountProperty->IncrementValue();