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
4b54d5a7
Commit
4b54d5a7
authored
Aug 15, 2017
by
Nikolas Bowe
Committed by
Michael Niedermayer
Aug 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/mov: Fix memory leak when reading DDTS box.
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
0ac8fce2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
mov.c
libavformat/mov.c
+3
-0
No files found.
libavformat/mov.c
View file @
4b54d5a7
...
...
@@ -889,6 +889,7 @@ static int mov_read_ddts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
init_get_bits
(
&
gb
,
buf
,
8
*
ddts_size
);
if
(
c
->
fc
->
nb_streams
<
1
)
{
av_free
(
buf
);
return
0
;
}
st
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
1
];
...
...
@@ -896,6 +897,7 @@ static int mov_read_ddts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
st
->
codecpar
->
sample_rate
=
get_bits_long
(
&
gb
,
32
);
if
(
st
->
codecpar
->
sample_rate
<=
0
)
{
av_log
(
c
->
fc
,
AV_LOG_ERROR
,
"Invalid sample rate %d
\n
"
,
st
->
codecpar
->
sample_rate
);
av_free
(
buf
);
return
AVERROR_INVALIDDATA
;
}
skip_bits_long
(
&
gb
,
32
);
/* max bitrate */
...
...
@@ -923,6 +925,7 @@ static int mov_read_ddts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
((
channel_layout_code
&
0x8
)
?
AV_CH_LOW_FREQUENCY
:
0
);
st
->
codecpar
->
channels
=
av_get_channel_layout_nb_channels
(
st
->
codecpar
->
channel_layout
);
av_free
(
buf
);
return
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