summaryrefslogtreecommitdiff
path: root/libavutil/avstring.h
diff options
context:
space:
mode:
authorLukasz Marek <lukasz.m.luki2@gmail.com>2014-07-05 18:12:02 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-03-31 23:50:46 +0200
commit31886968d338e8657f38c0e7c15ac269a8ca0880 (patch)
tree3ca5c0f2ad78bb13e73c8717bec88cf7b4d83e14 /libavutil/avstring.h
parent8b76c0eb561b0313e2a27950fe9d2bc5e4780dd8 (diff)
downloadffmpeg-31886968d338e8657f38c0e7c15ac269a8ca0880.tar.gz
lavu/avstring: add av_append_path_component() funcion
Convinient function to build paths. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/avstring.h')
-rw-r--r--libavutil/avstring.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavutil/avstring.h b/libavutil/avstring.h
index ffb7aa6bfa..466edaf968 100644
--- a/libavutil/avstring.h
+++ b/libavutil/avstring.h
@@ -276,6 +276,16 @@ const char *av_dirname(char *path);
*/
int av_match_name(const char *name, const char *names);
+/**
+ * Append path component to the existing path.
+ * Path separator '/' is placed between when needed.
+ * Resulting string have to be freed with av_free().
+ * @param path base path
+ * @param component component to be appended
+ * @return new path or NULL on error.
+ */
+char *av_append_path_component(const char *path, const char *component);
+
enum AVEscapeMode {
AV_ESCAPE_MODE_AUTO, ///< Use auto-selected escaping mode.
AV_ESCAPE_MODE_BACKSLASH, ///< Use backslash escaping.