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
383c6a3a
Commit
383c6a3a
authored
Jan 06, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/mov: use av_freep() to avoid leaving stale pointers in memory
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
62eafb6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
mov.c
libavformat/mov.c
+5
-5
No files found.
libavformat/mov.c
View file @
383c6a3a
...
...
@@ -1174,7 +1174,7 @@ static int mov_read_wave(MOVContext *c, AVIOContext *pb, MOVAtom atom)
st
->
codec
->
codec_id
==
AV_CODEC_ID_QDMC
||
st
->
codec
->
codec_id
==
AV_CODEC_ID_SPEEX
)
{
// pass all frma atom to codec, needed at least for QDMC and QDM2
av_free
(
st
->
codec
->
extradata
);
av_free
p
(
&
st
->
codec
->
extradata
);
if
(
ff_get_extradata
(
st
->
codec
,
pb
,
atom
.
size
)
<
0
)
return
AVERROR
(
ENOMEM
);
}
else
if
(
atom
.
size
>
8
)
{
/* to read frma, esds atoms */
...
...
@@ -1214,7 +1214,7 @@ static int mov_read_glbl(MOVContext *c, AVIOContext *pb, MOVAtom atom)
av_log
(
c
,
AV_LOG_WARNING
,
"ignoring multiple glbl
\n
"
);
return
0
;
}
av_free
(
st
->
codec
->
extradata
);
av_free
p
(
&
st
->
codec
->
extradata
);
if
(
ff_get_extradata
(
st
->
codec
,
pb
,
atom
.
size
)
<
0
)
return
AVERROR
(
ENOMEM
);
...
...
@@ -1239,7 +1239,7 @@ static int mov_read_dvc1(MOVContext *c, AVIOContext *pb, MOVAtom atom)
return
0
;
avio_seek
(
pb
,
6
,
SEEK_CUR
);
av_free
(
st
->
codec
->
extradata
);
av_free
p
(
&
st
->
codec
->
extradata
);
if
((
ret
=
ff_get_extradata
(
st
->
codec
,
pb
,
atom
.
size
-
7
))
<
0
)
return
ret
;
...
...
@@ -1265,7 +1265,7 @@ static int mov_read_strf(MOVContext *c, AVIOContext *pb, MOVAtom atom)
return
AVERROR_INVALIDDATA
;
avio_skip
(
pb
,
40
);
av_free
(
st
->
codec
->
extradata
);
av_free
p
(
&
st
->
codec
->
extradata
);
if
(
ff_get_extradata
(
st
->
codec
,
pb
,
atom
.
size
-
40
)
<
0
)
return
AVERROR
(
ENOMEM
);
return
0
;
...
...
@@ -4154,7 +4154,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
#if CONFIG_DV_DEMUXER
if
(
mov
->
dv_demux
&&
sc
->
dv_audio_container
)
{
avpriv_dv_produce_packet
(
mov
->
dv_demux
,
pkt
,
pkt
->
data
,
pkt
->
size
,
pkt
->
pos
);
av_free
(
pkt
->
data
);
av_free
p
(
&
pkt
->
data
);
pkt
->
size
=
0
;
ret
=
avpriv_dv_get_packet
(
mov
->
dv_demux
,
pkt
);
if
(
ret
<
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