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
fb6fa48f
Commit
fb6fa48f
authored
Feb 28, 2017
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/oggdec: Factor free_stream out
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
3250d4b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
oggdec.c
libavformat/oggdec.c
+16
-7
No files found.
libavformat/oggdec.c
View file @
fb6fa48f
...
...
@@ -63,6 +63,21 @@ static int64_t ogg_calc_pts(AVFormatContext *s, int idx, int64_t *dts);
static
int
ogg_new_stream
(
AVFormatContext
*
s
,
uint32_t
serial
);
static
int
ogg_restore
(
AVFormatContext
*
s
);
static
void
free_stream
(
AVFormatContext
*
s
,
int
i
)
{
struct
ogg
*
ogg
=
s
->
priv_data
;
struct
ogg_stream
*
stream
=
&
ogg
->
streams
[
i
];
av_freep
(
&
stream
->
buf
);
if
(
stream
->
codec
&&
stream
->
codec
->
cleanup
)
{
stream
->
codec
->
cleanup
(
s
,
i
);
}
av_freep
(
&
stream
->
private
);
av_freep
(
&
stream
->
new_metadata
);
}
//FIXME We could avoid some structure duplication
static
int
ogg_save
(
AVFormatContext
*
s
)
{
...
...
@@ -662,13 +677,7 @@ static int ogg_read_close(AVFormatContext *s)
int
i
;
for
(
i
=
0
;
i
<
ogg
->
nstreams
;
i
++
)
{
av_freep
(
&
ogg
->
streams
[
i
].
buf
);
if
(
ogg
->
streams
[
i
].
codec
&&
ogg
->
streams
[
i
].
codec
->
cleanup
)
{
ogg
->
streams
[
i
].
codec
->
cleanup
(
s
,
i
);
}
av_freep
(
&
ogg
->
streams
[
i
].
private
);
av_freep
(
&
ogg
->
streams
[
i
].
new_metadata
);
free_stream
(
s
,
i
);
}
ogg
->
nstreams
=
0
;
...
...
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