summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-02-12 21:59:26 +0100
committerwm4 <wm4@nowhere>2014-02-12 22:00:23 +0100
commitb8901bf04dad9f1bd9e4fcad4103b4e580606fce (patch)
treea7ffe074af3305af55b536f790bbb777f9539d2b
parent914f281bcb3034003cfb71e369aab5ea067ad0dc (diff)
downloadmpv-b8901bf04dad9f1bd9e4fcad4103b4e580606fce.tar.bz2
mpv-b8901bf04dad9f1bd9e4fcad4103b4e580606fce.tar.xz
command: fix metadata property
This crashed when retrieving the raw property value. Oops.
-rw-r--r--player/command.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/player/command.c b/player/command.c
index ada0aef16e..1a0ecaa0c4 100644
--- a/player/command.c
+++ b/player/command.c
@@ -707,8 +707,8 @@ static int tag_property(m_option_t *prop, int action, void *arg,
char **slist = NULL;
int num = 0;
for (int n = 0; n < tags->num_keys; n++) {
- MP_TARRAY_APPEND(NULL, slist, num, tags->keys[n]);
- MP_TARRAY_APPEND(NULL, slist, num, tags->values[n]);
+ MP_TARRAY_APPEND(NULL, slist, num, talloc_strdup(NULL, tags->keys[n]));
+ MP_TARRAY_APPEND(NULL, slist, num, talloc_strdup(NULL, tags->values[n]));
}
MP_TARRAY_APPEND(NULL, slist, num, NULL);
*(char ***)arg = slist;