X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fmpegenc.c;h=c77c3dfe41459b52f0196bcb694e50799df19351;hb=126e96533f4526fc84fa68f3023d991622e287d3;hp=878fa6381f15b9d0f1bc434ce0089997f7ef9843;hpb=1bc6cdf2fcbd3caea7b78d0a617c6e338606d756;p=ffmpeg diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c index 878fa6381f1..c77c3dfe414 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 =