X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=mp4.c;h=9ea65d07e7d1823b3039739102ec5a05797df3f9;hb=a23c7f2c797ac29ed76db5059b00e3b8e5e2042a;hp=3167a132b1b6ca7a230d37df8c49f1c9abc9a12b;hpb=dab576cb940f48319befac01f67f611f0acabe35;p=paraslash.git diff --git a/mp4.c b/mp4.c index 3167a132..9ea65d07 100644 --- a/mp4.c +++ b/mp4.c @@ -1206,24 +1206,19 @@ static unsigned membuffer_write_int32(struct membuffer *buf, uint32_t data) static void membuffer_write_std_tag(struct membuffer *buf, const char *name, const char *value) { - uint32_t flags = 1; - - /* special check for compilation flag */ - if (strcmp(name, "cpil") == 0) { - flags = 21; - } - - membuffer_write_int32(buf, - 8 /*atom header */ + 8 /*data atom header */ + - 8 /*flags + reserved */ + strlen(value)); + uint32_t len = strlen(value); + membuffer_write_int32(buf, 8 /* atom header */ + + 8 /* data atom header */ + + 8 /* flags + reserved */ + + len); membuffer_write_atom_name(buf, name); - membuffer_write_int32(buf, - 8 /*data atom header */ + - 8 /*flags + reserved */ + strlen(value)); + membuffer_write_int32(buf, 8 /* data atom header */ + + 8 /* flags + reserved */ + + len); membuffer_write_atom_name(buf, "data"); - membuffer_write_int32(buf, flags); //flags - membuffer_write_int32(buf, 0); //reserved - membuffer_write(buf, value, strlen(value)); + membuffer_write_int32(buf, 1); /* flags */ + membuffer_write_int32(buf, 0); /* reserved */ + membuffer_write(buf, value, len); } static unsigned membuffer_error(const struct membuffer *buf)