X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fmpegenc.c;h=c77c3dfe41459b52f0196bcb694e50799df19351;hb=a70d5e25936424112ecbeb1c304100e68bce0faa;hp=878fa6381f15b9d0f1bc434ce0089997f7ef9843;hpb=d3426fb5921d069cd950e43504b005bfbb1686d2;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 =