mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avformat/mpegenc: Check for av_mallocz() failure
Fixes CID1257787 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
fd1fcb59dc
commit
9b9e4a71c5
@ -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 =
|
||||
|
Loading…
x
Reference in New Issue
Block a user