diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-12-21 23:41:49 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-12-21 23:41:49 +0100 |
commit | 9b9e4a71c57261b6b690d9649b8e7a347df6a78b (patch) | |
tree | 485a7e4399289fd7fbceda48451be2117999eb0e | |
parent | fd1fcb59dcdb0b1644097a69d0c64084bdc26052 (diff) | |
download | ffmpeg-9b9e4a71c57261b6b690d9649b8e7a347df6a78b.tar.gz |
avformat/mpegenc: Check for av_mallocz() failure
Fixes CID1257787
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/mpegenc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c index 878fa6381f..c77c3dfe41 100644 --- a/libavformat/mpegenc.c +++ b/libavformat/mpegenc.c @@ -1146,6 +1146,8 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt) stream->next_packet = &stream->premux_packet; *stream->next_packet = pkt_desc = av_mallocz(sizeof(PacketDesc)); + if (!pkt_desc) + return AVERROR(ENOMEM); pkt_desc->pts = pts; pkt_desc->dts = dts; pkt_desc->unwritten_size = |