summaryrefslogtreecommitdiff
path: root/libavformat/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/url.c')
-rw-r--r--libavformat/url.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/libavformat/url.c b/libavformat/url.c
index 92cd5f183a..596fb49cfc 100644
--- a/libavformat/url.c
+++ b/libavformat/url.c
@@ -2,20 +2,20 @@
* URL utility functions
* Copyright (c) 2000, 2001, 2002 Fabrice Bellard
*
- * This file is part of Libav.
+ * This file is part of FFmpeg.
*
- * Libav is free software; you can redistribute it and/or
+ * FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * Libav is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with Libav; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
@@ -68,7 +68,7 @@ int ff_url_join(char *str, int size, const char *proto,
av_strlcatf(str, size, ":%d", port);
if (fmt) {
va_list vl;
- int len = strlen(str);
+ size_t len = strlen(str);
va_start(vl, fmt);
vsnprintf(str + len, size > len ? size - len : 0, fmt, vl);
@@ -145,3 +145,19 @@ void ff_make_absolute_url(char *buf, int size, const char *base,
}
av_strlcat(buf, rel, size);
}
+
+AVIODirEntry *ff_alloc_dir_entry(void)
+{
+ AVIODirEntry *entry = av_mallocz(sizeof(AVIODirEntry));
+ if (entry) {
+ entry->type = AVIO_ENTRY_UNKNOWN;
+ entry->size = -1;
+ entry->modification_timestamp = -1;
+ entry->access_timestamp = -1;
+ entry->status_change_timestamp = -1;
+ entry->user_id = -1;
+ entry->group_id = -1;
+ entry->filemode = -1;
+ }
+ return entry;
+}