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
70d25268
Commit
70d25268
authored
May 21, 2018
by
Aman Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/mpegts: fix memory leak with merge_pmt_versions=1
Signed-off-by:
Aman Gupta
<
aman@tmm1.net
>
parent
fc2daf36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
mpegts.c
libavformat/mpegts.c
+5
-2
No files found.
libavformat/mpegts.c
View file @
70d25268
...
...
@@ -247,6 +247,7 @@ typedef struct PESContext {
uint8_t
header
[
MAX_PES_HEADER_SIZE
];
AVBufferRef
*
buffer
;
SLConfigDescr
sl
;
int
merged_st
;
}
PESContext
;
extern
AVInputFormat
ff_mpegts_demuxer
;
...
...
@@ -550,8 +551,8 @@ static void mpegts_close_filter(MpegTSContext *ts, MpegTSFilter *filter)
PESContext
*
pes
=
filter
->
u
.
pes_filter
.
opaque
;
av_buffer_unref
(
&
pes
->
buffer
);
/* referenced private data will be freed later in
* avformat_close_input */
if
(
!
((
PESContext
*
)
filter
->
u
.
pes_filter
.
opaque
)
->
st
)
{
* avformat_close_input
(pes->st->priv_data == pes)
*/
if
(
!
pes
->
st
||
pes
->
merged_
st
)
{
av_freep
(
&
filter
->
u
.
pes_filter
.
opaque
);
}
}
...
...
@@ -2190,6 +2191,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
if
(
st
)
{
pes
->
st
=
st
;
pes
->
stream_type
=
stream_type
;
pes
->
merged_st
=
1
;
}
}
if
(
!
pes
->
st
)
{
...
...
@@ -2211,6 +2213,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
if
(
st
)
{
pes
->
st
=
st
;
pes
->
stream_type
=
stream_type
;
pes
->
merged_st
=
1
;
}
}
if
(
pes
&&
!
pes
->
st
)
{
...
...
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