Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
edf96d63
Commit
edf96d63
authored
Jun 01, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
url: add ffurl_closep() which also sets the context pointer to NULL
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
f89aa675
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
avio.c
libavformat/avio.c
+9
-2
url.h
libavformat/url.h
+2
-1
No files found.
libavformat/avio.c
View file @
edf96d63
...
...
@@ -315,8 +315,9 @@ int64_t ffurl_seek(URLContext *h, int64_t pos, int whence)
return
ret
;
}
int
ffurl_close
(
URLContext
*
h
)
int
ffurl_close
p
(
URLContext
**
h
h
)
{
URLContext
*
h
=
*
hh
;
int
ret
=
0
;
if
(
!
h
)
return
0
;
/* can happen when ffurl_open fails */
...
...
@@ -331,10 +332,16 @@ int ffurl_close(URLContext *h)
av_opt_free
(
h
->
priv_data
);
av_freep
(
&
h
->
priv_data
);
}
av_free
(
h
);
av_free
p
(
h
h
);
return
ret
;
}
int
ffurl_close
(
URLContext
*
h
)
{
return
ffurl_closep
(
&
h
);
}
int
avio_check
(
const
char
*
url
,
int
flags
)
{
URLContext
*
h
;
...
...
libavformat/url.h
View file @
edf96d63
...
...
@@ -179,11 +179,12 @@ int64_t ffurl_seek(URLContext *h, int64_t pos, int whence);
/**
* Close the resource accessed by the URLContext h, and free the
* memory used by it.
* memory used by it.
Also set the URLContext pointer to NULL.
*
* @return a negative value if an error condition occurred, 0
* otherwise
*/
int
ffurl_closep
(
URLContext
**
h
);
int
ffurl_close
(
URLContext
*
h
);
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment