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
0026c4ec
Commit
0026c4ec
authored
Oct 07, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/hls: use av_freep(), do not leave stale pointers in memory
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
f0d1b3ac
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
hls.c
libavformat/hls.c
+5
-5
No files found.
libavformat/hls.c
View file @
0026c4ec
...
@@ -193,9 +193,9 @@ static void free_segment_list(struct playlist *pls)
...
@@ -193,9 +193,9 @@ static void free_segment_list(struct playlist *pls)
{
{
int
i
;
int
i
;
for
(
i
=
0
;
i
<
pls
->
n_segments
;
i
++
)
{
for
(
i
=
0
;
i
<
pls
->
n_segments
;
i
++
)
{
av_free
(
pls
->
segments
[
i
]
->
key
);
av_free
p
(
&
pls
->
segments
[
i
]
->
key
);
av_free
(
pls
->
segments
[
i
]
->
url
);
av_free
p
(
&
pls
->
segments
[
i
]
->
url
);
av_free
(
pls
->
segments
[
i
]);
av_free
p
(
&
pls
->
segments
[
i
]);
}
}
av_freep
(
&
pls
->
segments
);
av_freep
(
&
pls
->
segments
);
pls
->
n_segments
=
0
;
pls
->
n_segments
=
0
;
...
@@ -212,7 +212,7 @@ static void free_playlist_list(HLSContext *c)
...
@@ -212,7 +212,7 @@ static void free_playlist_list(HLSContext *c)
av_dict_free
(
&
pls
->
id3_initial
);
av_dict_free
(
&
pls
->
id3_initial
);
ff_id3v2_free_extra_meta
(
&
pls
->
id3_deferred_extra
);
ff_id3v2_free_extra_meta
(
&
pls
->
id3_deferred_extra
);
av_free_packet
(
&
pls
->
pkt
);
av_free_packet
(
&
pls
->
pkt
);
av_free
(
pls
->
pb
.
buffer
);
av_free
p
(
&
pls
->
pb
.
buffer
);
if
(
pls
->
input
)
if
(
pls
->
input
)
ffurl_close
(
pls
->
input
);
ffurl_close
(
pls
->
input
);
if
(
pls
->
ctx
)
{
if
(
pls
->
ctx
)
{
...
@@ -243,7 +243,7 @@ static void free_rendition_list(HLSContext *c)
...
@@ -243,7 +243,7 @@ static void free_rendition_list(HLSContext *c)
{
{
int
i
;
int
i
;
for
(
i
=
0
;
i
<
c
->
n_renditions
;
i
++
)
for
(
i
=
0
;
i
<
c
->
n_renditions
;
i
++
)
av_free
(
c
->
renditions
[
i
]);
av_free
p
(
&
c
->
renditions
[
i
]);
av_freep
(
&
c
->
renditions
);
av_freep
(
&
c
->
renditions
);
c
->
n_renditions
=
0
;
c
->
n_renditions
=
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