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
bb5e7d3b
Commit
bb5e7d3b
authored
Sep 14, 2013
by
Piotr Bandurski
Committed by
Michael Niedermayer
Sep 14, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/mationpixels: free memory after malloc failures
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
7d8939a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
motionpixels.c
libavcodec/motionpixels.c
+5
-1
No files found.
libavcodec/motionpixels.c
View file @
bb5e7d3b
...
@@ -68,8 +68,12 @@ static av_cold int mp_decode_init(AVCodecContext *avctx)
...
@@ -68,8 +68,12 @@ static av_cold int mp_decode_init(AVCodecContext *avctx)
mp
->
offset_bits_len
=
av_log2
(
avctx
->
width
*
avctx
->
height
)
+
1
;
mp
->
offset_bits_len
=
av_log2
(
avctx
->
width
*
avctx
->
height
)
+
1
;
mp
->
vpt
=
av_mallocz
(
avctx
->
height
*
sizeof
(
YuvPixel
));
mp
->
vpt
=
av_mallocz
(
avctx
->
height
*
sizeof
(
YuvPixel
));
mp
->
hpt
=
av_mallocz
(
h4
*
w4
/
16
*
sizeof
(
YuvPixel
));
mp
->
hpt
=
av_mallocz
(
h4
*
w4
/
16
*
sizeof
(
YuvPixel
));
if
(
!
mp
->
changes_map
||
!
mp
->
vpt
||
!
mp
->
hpt
)
if
(
!
mp
->
changes_map
||
!
mp
->
vpt
||
!
mp
->
hpt
)
{
av_freep
(
&
mp
->
changes_map
);
av_freep
(
&
mp
->
vpt
);
av_freep
(
&
mp
->
hpt
);
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
}
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB555
;
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB555
;
avcodec_get_frame_defaults
(
&
mp
->
frame
);
avcodec_get_frame_defaults
(
&
mp
->
frame
);
return
0
;
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