Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
8a273a74
Commit
8a273a74
authored
Feb 24, 2015
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avio: Add an internal utility function for freeing dynamic buffers
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
078d43e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
avio_internal.h
libavformat/avio_internal.h
+7
-0
aviobuf.c
libavformat/aviobuf.c
+10
-0
No files found.
libavformat/avio_internal.h
View file @
8a273a74
...
...
@@ -139,4 +139,11 @@ int ffio_open_null_buf(AVIOContext **s);
*/
int
ffio_close_null_buf
(
AVIOContext
*
s
);
/**
* Free a dynamic buffer.
*
* @param s a pointer to an IO context opened by avio_open_dyn_buf()
*/
void
ffio_free_dyn_buf
(
AVIOContext
**
s
);
#endif
/* AVFORMAT_AVIO_INTERNAL_H */
libavformat/aviobuf.c
View file @
8a273a74
...
...
@@ -991,6 +991,16 @@ int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
return
size
-
padding
;
}
void
ffio_free_dyn_buf
(
AVIOContext
**
s
)
{
uint8_t
*
tmp
;
if
(
!*
s
)
return
;
avio_close_dyn_buf
(
*
s
,
&
tmp
);
av_free
(
tmp
);
*
s
=
NULL
;
}
static
int
null_buf_write
(
void
*
opaque
,
uint8_t
*
buf
,
int
buf_size
)
{
DynBuffer
*
d
=
opaque
;
...
...
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