This website works better with JavaScript.
Home
Help
Sign In
falkTX
/
FFmpeg
mirror of
https://github.com/falkTX/FFmpeg.git
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
338
Wiki
Activity
Browse Source
libavformat: Check for malloc failures in avformat_new_stream
CC:
libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
tags/n2.6
Martin Storsjö
10 years ago
parent
c4aa0f865f
commit
9f810a9b37
1 changed files
with
5 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+5
-0
libavformat/utils.c
+ 5
- 0
libavformat/utils.c
View File
@@ -2525,6 +2525,11 @@ AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c)
}
st->codec = avcodec_alloc_context3(c);
if (!st->codec) {
av_free(st->info);
av_free(st);
return NULL;
}
if (s->iformat) {
/* no default bitrate if decoding */
st->codec->bit_rate = 0;
Write
Preview
Loading…
Cancel
Save