mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-27 05:00:37 +00:00
avformat/test/fifo_muxer: add check for FailingMuxerPacketData alloc
CID: 1396257 Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
This commit is contained in:
parent
2d208aaabe
commit
d1f3e475f9
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user