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
4d7a0a05
Commit
4d7a0a05
authored
May 20, 2002
by
Fabrice Bellard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better av_freep()
Originally committed as revision 541 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
51a49663
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
common.h
libavcodec/common.h
+2
-9
utils.c
libavcodec/utils.c
+7
-0
No files found.
libavcodec/common.h
View file @
4d7a0a05
...
@@ -57,14 +57,6 @@ typedef INT32 int32_t;
...
@@ -57,14 +57,6 @@ typedef INT32 int32_t;
#define inline __inline
#define inline __inline
/*
Disable warning messages:
warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
warning C4305: 'argument' : truncation from 'const double' to 'float'
*/
#pragma warning( disable : 4244 )
#pragma warning( disable : 4305 )
#else
#else
#define INT64_C(c) (c ## LL)
#define INT64_C(c) (c ## LL)
#define UINT64_C(c) (c ## ULL)
#define UINT64_C(c) (c ## ULL)
...
@@ -901,7 +893,8 @@ static inline int clip(int a, int amin, int amax)
...
@@ -901,7 +893,8 @@ static inline int clip(int a, int amin, int amax)
void
*
av_malloc
(
int
size
);
void
*
av_malloc
(
int
size
);
void
*
av_mallocz
(
int
size
);
void
*
av_mallocz
(
int
size
);
void
av_free
(
void
*
ptr
);
void
av_free
(
void
*
ptr
);
#define av_freep(p) do { av_free(*p); *p = NULL; } while (0)
void
__av_freep
(
void
**
ptr
);
#define av_freep(p) __av_freep((void **)(p))
/* math */
/* math */
int
ff_gcd
(
int
a
,
int
b
);
int
ff_gcd
(
int
a
,
int
b
);
...
...
libavcodec/utils.c
View file @
4d7a0a05
...
@@ -65,6 +65,13 @@ void av_free(void *ptr)
...
@@ -65,6 +65,13 @@ void av_free(void *ptr)
free
(
ptr
);
free
(
ptr
);
}
}
/* cannot call it directly because of 'void **' casting is not automatic */
void
__av_freep
(
void
**
ptr
)
{
av_free
(
*
ptr
);
*
ptr
=
NULL
;
}
/* encoder management */
/* encoder management */
AVCodec
*
first_avcodec
;
AVCodec
*
first_avcodec
;
...
...
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