25.10.2014 03:21, Peter Meerwald wrote:
@@ -94,7 +99,13 @@ static void extend(pa_tagstruct*t, size_t l) { if (t->length+l <= t->allocated) return;- t->data = pa_xrealloc(t->data, t->allocated = t->length+l+100); + if (t->type == PA_TAGSTRUCT_DYNAMIC) + t->data = pa_xrealloc(t->data, t->allocated = t->length+l+100); + else if (t->type == PA_TAGSTRUCT_APPENDED) { + t->type = PA_TAGSTRUCT_DYNAMIC; + t->data = pa_xmalloc(t->allocated = t->length+l+100); + memcpy(t->data, t->per_type.appended, t->length); + } } void pa_tagstruct_puts(pa_tagstruct*t, const char *s) {
While you are at it, could you please move the (pre-existing) magic number 100 into a #define?
-- Alexander E. Patrakov _______________________________________________ pulseaudio-discuss mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
