[FFmpeg-cvslog] avformat/test/fifo_muxer: add check for FailingMuxerPacketData alloc
Steven Liu
git at videolan.org
Fri Jan 6 00:36:23 EET 2017
ffmpeg | branch: master | Steven Liu <lq at chinaffmpeg.org> | Fri Jan 6 06:35:32 2017 +0800| [d1f3e475f9807b445ba37ff2fd23f71c4645de79] | committer: Steven Liu
avformat/test/fifo_muxer: add check for FailingMuxerPacketData alloc
CID: 1396257
Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Steven Liu <lq at chinaffmpeg.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d1f3e475f9807b445ba37ff2fd23f71c4645de79
---
libavformat/tests/fifo_muxer.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/tests/fifo_muxer.c b/libavformat/tests/fifo_muxer.c
index dc62965..e20bd6e 100644
--- a/libavformat/tests/fifo_muxer.c
+++ b/libavformat/tests/fifo_muxer.c
@@ -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));
More information about the ffmpeg-cvslog
mailing list