diff options
author | wm4 <wm4@nowhere> | 2014-11-24 19:56:01 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-11-24 19:56:01 +0100 |
commit | 28b6ce39d3d88d0159b54c8ca558e993eac93056 (patch) | |
tree | fa3c94a84cd2efebf24b1ea5fd75dd1fbcc01c12 /player | |
parent | 2228d4737367fb0303bec263bc06ca90c9ff8757 (diff) | |
download | mpv-28b6ce39d3d88d0159b54c8ca558e993eac93056.tar.bz2 mpv-28b6ce39d3d88d0159b54c8ca558e993eac93056.tar.xz |
audio: make mp_chmap_to_str() return a stack-allocated string
Simplifies memory management.
Diffstat (limited to 'player')
-rw-r--r-- | player/command.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/player/command.c b/player/command.c index 90adf003eb..ec4f2030bb 100644 --- a/player/command.c +++ b/player/command.c @@ -1571,7 +1571,7 @@ static int mp_property_channels(void *ctx, struct m_property *prop, return M_PROPERTY_UNAVAILABLE; switch (action) { case M_PROPERTY_PRINT: - *(char **) arg = mp_chmap_to_str(&fmt.channels); + *(char **) arg = talloc_strdup(NULL, mp_chmap_to_str(&fmt.channels)); return M_PROPERTY_OK; case M_PROPERTY_GET: *(int *)arg = fmt.channels.num; |