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
d2d96f9e
Commit
d2d96f9e
authored
Sep 12, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vformat/smacker: use av_freep() to ensure no stale pointers remain
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
b211607b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
smacker.c
libavformat/smacker.c
+7
-7
No files found.
libavformat/smacker.c
View file @
d2d96f9e
...
...
@@ -217,14 +217,14 @@ static int smacker_read_header(AVFormatContext *s)
st
->
codec
->
extradata_size
=
smk
->
treesize
+
16
;
if
(
!
st
->
codec
->
extradata
){
av_log
(
s
,
AV_LOG_ERROR
,
"Cannot allocate %i bytes of extradata
\n
"
,
smk
->
treesize
+
16
);
av_free
(
smk
->
frm_size
);
av_free
(
smk
->
frm_flags
);
av_free
p
(
&
smk
->
frm_size
);
av_free
p
(
&
smk
->
frm_flags
);
return
AVERROR
(
ENOMEM
);
}
ret
=
avio_read
(
pb
,
st
->
codec
->
extradata
+
16
,
st
->
codec
->
extradata_size
-
16
);
if
(
ret
!=
st
->
codec
->
extradata_size
-
16
){
av_free
(
smk
->
frm_size
);
av_free
(
smk
->
frm_flags
);
av_free
p
(
&
smk
->
frm_size
);
av_free
p
(
&
smk
->
frm_flags
);
return
AVERROR
(
EIO
);
}
((
int32_t
*
)
st
->
codec
->
extradata
)[
0
]
=
av_le2ne32
(
smk
->
mmap_size
);
...
...
@@ -369,9 +369,9 @@ static int smacker_read_close(AVFormatContext *s)
int
i
;
for
(
i
=
0
;
i
<
7
;
i
++
)
av_free
(
smk
->
bufs
[
i
]);
av_free
(
smk
->
frm_size
);
av_free
(
smk
->
frm_flags
);
av_free
p
(
&
smk
->
bufs
[
i
]);
av_free
p
(
&
smk
->
frm_size
);
av_free
p
(
&
smk
->
frm_flags
);
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