Commit 7129dfdb authored by Steven Liu's avatar Steven Liu Committed by Michael Niedermayer

avformat/test/fifo_muxer: add check for FailingMuxerPacketData alloc

CID: 1396257
Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: 's avatarSteven Liu <lq@chinaffmpeg.org>
(cherry picked from commit d1f3e475)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent efc708af
......@@ -150,6 +150,9 @@ static int prepare_packet(AVPacket *pkt,const FailingMuxerPacketData *pkt_data,
{
int ret;
FailingMuxerPacketData *data = av_malloc(sizeof(*data));
if (!data) {
return AVERROR(ENOMEM);
}
memcpy(data, pkt_data, sizeof(FailingMuxerPacketData));
ret = av_packet_from_data(pkt, (uint8_t*) data, sizeof(*data));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment