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
81c5f887
Commit
81c5f887
authored
Mar 03, 2004
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macrofree av_freep()
Originally committed as revision 2839 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
461cd5bf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
avcodec.h
libavcodec/avcodec.h
+1
-2
utils.c
libavcodec/utils.c
+6
-2
No files found.
libavcodec/avcodec.h
View file @
81c5f887
...
...
@@ -2073,8 +2073,7 @@ void *av_mallocz(unsigned int size);
void
*
av_realloc
(
void
*
ptr
,
unsigned
int
size
);
void
av_free
(
void
*
ptr
);
char
*
av_strdup
(
const
char
*
s
);
void
__av_freep
(
void
**
ptr
);
#define av_freep(p) __av_freep((void **)(p))
void
av_freep
(
void
*
ptr
);
void
*
av_fast_realloc
(
void
*
ptr
,
unsigned
int
*
size
,
unsigned
int
min_size
);
/* for static data only */
/* call av_free_static to release all staticaly allocated tables */
...
...
libavcodec/utils.c
View file @
81c5f887
...
...
@@ -103,9 +103,13 @@ void av_free_static(void)
last_static
=
0
;
}
/* cannot call it directly because of 'void **' casting is not automatic */
void
__av_freep
(
void
**
ptr
)
/**
* Frees memory and sets the pointer to NULL.
* @param arg pointer to the pointer which should be freed
*/
void
av_freep
(
void
*
arg
)
{
void
**
ptr
=
(
void
**
)
arg
;
av_free
(
*
ptr
);
*
ptr
=
NULL
;
}
...
...
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