From 8cdcf09138c70ba4cc553401ec327b22d2d53042 Mon Sep 17 00:00:00 2001 From: "John A. Stebbins" Date: Mon, 19 May 2008 21:06:07 -0600 Subject: [PATCH] Add an empty Target when creating a Tag. --- src/tags.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/tags.c b/src/tags.c index 0afa62e..2907610 100644 --- a/src/tags.c +++ b/src/tags.c @@ -25,7 +25,7 @@ int mk_createTagSimple(mk_Writer * w, char *tag_id, char *value) { - mk_Context *simple; + mk_Context *simple, *targets; if (w->tags == NULL) { /* Tags */ @@ -34,6 +34,12 @@ int mk_createTagSimple(mk_Writer * w, char *tag_id, char *value) /* Tag */ if ((w->tag = mk_createContext(w, w->tags, MATROSKA_ID_TAG)) == NULL) return -1; + /* Targets */ + if ((targets = mk_createContext(w, w->tag, MATROSKA_ID_TARGETS)) == NULL) + return -1; + /* TargetTypeValue */ + CHECK(mk_writeUInt(targets, MATROSKA_ID_TARGETTYPEVALUE, MK_TARGETTYPE_MOVIE)); /* Album/Movie/Episode */ + CHECK(mk_closeContext(targets, 0)); } /* SimpleTag */ if ((simple = mk_createContext(w, w->tag, MATROSKA_ID_SIMPLETAG)) == NULL) -- 2.11.4.GIT