mirror of https://git.ffmpeg.org/ffmpeg.git
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…
Reference in New Issue