aboutsummaryrefslogtreecommitdiff
path: root/libavformat/avio.c
diff options
context:
space:
mode:
authorRonald S. Bultje2007-01-14 22:07:19 +0000
committerGuillaume Poirier2007-01-14 22:07:19 +0000
commit621810045cc0b5174e0243796026eb622b985a6c (patch)
tree5c478df1ae0f76a616ff40c60ed1bab3dbb3ce4e /libavformat/avio.c
parentfb2b4fc50a5aa549f4f30e93f53636c16be7f729 (diff)
makes the filename member of the URLContext a pointer, so that the
structure can be extended in the future without breaking ABI. patch by Ronald S. Bultje % rbultje A ronald P bitfreak P net % Original thread: Date: Jan 1, 2007 6:01 PM Subject: [Ffmpeg-devel] make URLContext->filename a pointer Originally committed as revision 7506 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avio.c')
-rw-r--r--libavformat/avio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c
index dc40384fc5..44bc3afeaf 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -70,11 +70,14 @@ int url_open(URLContext **puc, const char *filename, int flags)
err = -ENOENT;
goto fail;
found:
- uc = av_malloc(sizeof(URLContext) + strlen(filename));
+ uc = av_malloc(sizeof(URLContext) + strlen(filename) + 1);
if (!uc) {
err = -ENOMEM;
goto fail;
}
+#if LIBAVFORMAT_VERSION_INT >= (52<<16)
+ uc->filename = (char *) &uc[1];
+#endif
strcpy(uc->filename, filename);
uc->prot = up;
uc->flags = flags;