提交 9b9e4a71 编写于 作者: M Michael Niedermayer

avformat/mpegenc: Check for av_mallocz() failure

Fixes CID1257787
Signed-off-by: NMichael Niedermayer <michael@niedermayer.cc>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册