Commit 9b9e4a71 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mpegenc: Check for av_mallocz() failure

Fixes CID1257787
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent fd1fcb59
......@@ -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 =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment