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
a66893ac
Commit
a66893ac
authored
Dec 12, 2014
by
wm4
Committed by
Michael Niedermayer
Dec 12, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/utils: check for malloc failure
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
ce35a613
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
utils.c
libavformat/utils.c
+5
-0
No files found.
libavformat/utils.c
View file @
a66893ac
...
@@ -3652,6 +3652,11 @@ AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c)
...
@@ -3652,6 +3652,11 @@ AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c)
st
->
info
->
last_dts
=
AV_NOPTS_VALUE
;
st
->
info
->
last_dts
=
AV_NOPTS_VALUE
;
st
->
codec
=
avcodec_alloc_context3
(
c
);
st
->
codec
=
avcodec_alloc_context3
(
c
);
if
(
!
st
->
codec
)
{
av_free
(
st
->
info
);
av_free
(
st
);
return
NULL
;
}
if
(
s
->
iformat
)
{
if
(
s
->
iformat
)
{
/* no default bitrate if decoding */
/* no default bitrate if decoding */
st
->
codec
->
bit_rate
=
0
;
st
->
codec
->
bit_rate
=
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