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
e29153f4
Commit
e29153f4
authored
Nov 24, 2014
by
Lukasz Marek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/avuienc: fix mem leak in case of init failure
Signed-off-by:
Lukasz Marek
<
lukasz.m.luki2@gmail.com
>
parent
23e91a1b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
avuienc.c
libavcodec/avuienc.c
+5
-6
No files found.
libavcodec/avuienc.c
View file @
e29153f4
...
...
@@ -25,16 +25,10 @@
static
av_cold
int
avui_encode_init
(
AVCodecContext
*
avctx
)
{
avctx
->
coded_frame
=
av_frame_alloc
();
if
(
avctx
->
width
!=
720
||
avctx
->
height
!=
486
&&
avctx
->
height
!=
576
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Only 720x486 and 720x576 are supported.
\n
"
);
return
AVERROR
(
EINVAL
);
}
if
(
!
avctx
->
coded_frame
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Could not allocate frame.
\n
"
);
return
AVERROR
(
ENOMEM
);
}
if
(
!
(
avctx
->
extradata
=
av_mallocz
(
24
+
FF_INPUT_BUFFER_PADDING_SIZE
)))
return
AVERROR
(
ENOMEM
);
avctx
->
extradata_size
=
24
;
...
...
@@ -45,6 +39,11 @@ static av_cold int avui_encode_init(AVCodecContext *avctx)
avctx
->
extradata
[
19
]
=
1
;
}
avctx
->
coded_frame
=
av_frame_alloc
();
if
(
!
avctx
->
coded_frame
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Could not allocate frame.
\n
"
);
return
AVERROR
(
ENOMEM
);
}
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