mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-12 18:10:13 +01:00
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
This commit is contained in:
committed by
Guillaume Poirier
parent
fb2b4fc50a
commit
621810045c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user