Commit d1f3e475 authored by Steven Liu's avatar Steven Liu

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>
parent 2d208aaa
......@@ -151,6 +151,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